Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ExternalBoardPlugInMain.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15 by h677, Mon Oct 25 12:37:17 2004 UTC revision 1.16 by h677, Sat Jun 25 11:27:22 2005 UTC
# Line 46  type Line 46  type
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(
# Line 325  end; Line 333  end;
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
# Line 332  var Line 341  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}
# Line 343  begin Line 352  begin
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
# Line 461  begin Line 468  begin
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 );

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26