| 46 |
): TAcceptType; stdcall; // URL の種類 |
): TAcceptType; stdcall; // URL の種類 |
| 47 |
|
|
| 48 |
// ************************************************************************* |
// ************************************************************************* |
| 49 |
|
// 指定したURLを現在のURLに変換する |
| 50 |
|
// ************************************************************************* |
| 51 |
|
TOnExtractBoardURL = procedure( |
| 52 |
|
inURL : PChar; // 変換するURL; |
| 53 |
|
var outURL: PChar // 変換されたURL |
| 54 |
|
); stdcall; // 変換されたURL |
| 55 |
|
|
| 56 |
|
// ************************************************************************* |
| 57 |
// メニューハンドラ |
// メニューハンドラ |
| 58 |
// ************************************************************************* |
// ************************************************************************* |
| 59 |
TOnPlugInMenu = procedure( |
TOnPlugInMenu = procedure( |
| 333 |
function InternalPost( |
function InternalPost( |
| 334 |
inURL : PChar; // 送信する URL |
inURL : PChar; // 送信する URL |
| 335 |
inSource : PChar; // 送信する内容 |
inSource : PChar; // 送信する内容 |
| 336 |
|
inReferer : PChar; // Referer |
| 337 |
var outResultData : PChar // 返ってきた文字列 |
var outResultData : PChar // 返ってきた文字列 |
| 338 |
) : Longint; stdcall; // レスポンスコード |
) : Longint; stdcall; // レスポンスコード |
| 339 |
var |
var |
| 341 |
content : string; |
content : string; |
| 342 |
resStream : TStringStream; |
resStream : TStringStream; |
| 343 |
sourceStream : TStringStream; |
sourceStream : TStringStream; |
| 344 |
tmpURL, Protocol, Host, Path, Document, Port, Bookmark : string; |
|
| 345 |
begin |
begin |
| 346 |
|
|
| 347 |
{$IFDEF DEBUG} |
{$IFDEF DEBUG} |
| 352 |
httpSocket := TIdHTTP.Create( nil ); |
httpSocket := TIdHTTP.Create( nil ); |
| 353 |
try |
try |
| 354 |
InitializeSocket( httpSocket ); |
InitializeSocket( httpSocket ); |
|
tmpURL := string(inURL); |
|
|
GikoSys.ParseURI(tmpURL, Protocol,Host, Path, Document, Port, Bookmark); |
|
| 355 |
httpSocket.Request.CustomHeaders.Add('Pragma: no-cache'); |
httpSocket.Request.CustomHeaders.Add('Pragma: no-cache'); |
| 356 |
httpSocket.Request.AcceptLanguage := 'ja'; |
httpSocket.Request.AcceptLanguage := 'ja'; |
| 357 |
httpSocket.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*'; |
httpSocket.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*'; |
| 358 |
httpSocket.Request.ContentType := 'application/x-www-form-urlencoded'; |
httpSocket.Request.ContentType := 'application/x-www-form-urlencoded'; |
| 359 |
httpSocket.Request.Referer := Protocol + '://' + Host; |
httpSocket.Request.Referer := string(inReferer); |
| 360 |
resStream := TStringStream.Create( content ); |
resStream := TStringStream.Create( content ); |
| 361 |
sourceStream := TStringStream.Create( string( inSource ) ); |
sourceStream := TStringStream.Create( string( inSource ) ); |
| 362 |
try |
try |
| 468 |
|
|
| 469 |
// ダミーのクラス |
// ダミーのクラス |
| 470 |
board := TBoard.Create( nil, 'about://dummy/' ); |
board := TBoard.Create( nil, 'about://dummy/' ); |
| 471 |
threadItem := TThreadItem.Create( nil, 'about://dummy/test/read.cgi/dummy/' ); |
threadItem := TThreadItem.Create( nil, board, 'about://dummy/test/read.cgi/dummy/' ); |
| 472 |
try |
try |
| 473 |
try |
try |
| 474 |
board.Add( threadItem ); |
board.Add( threadItem ); |