OSDN Git Service

・AcceptURL の戻り値で URL の種類が判別できるようになった。
authoryoffy <yoffy>
Fri, 21 Nov 2003 06:14:31 +0000 (06:14 +0000)
committeryoffy <yoffy>
Fri, 21 Nov 2003 06:14:31 +0000 (06:14 +0000)
BoardGroup.pas
ExternalBoardManager.pas
ExternalBoardPlugInMain.pas

index 149fef7..cc5e703 100644 (file)
@@ -4,7 +4,7 @@ interface
 
 uses
        Windows, SysUtils, Classes, ComCtrls, IniFiles, {HTTPApp,} YofUtils, IdGlobal,
-       ExternalBoardManager;
+       ExternalBoardManager, ExternalBoardPlugInMain;
 
 type
        //\83\8a\83X\83g\82Ì\95\\8e¦\83A\83C\83e\83\80\91I\91ð
@@ -607,9 +607,9 @@ begin
                                                kbound := High( BoardPlugIns );
                                                for k := Low( BoardPlugIns ) to kbound do begin
                                                        if Assigned( Pointer( BoardPlugIns[ k ].Module ) ) then begin
-                                                               if BoardPlugIns[ k ].AcceptURL( inistr ) then begin
+                                                               if BoardPlugIns[ k ].AcceptURL( inistr ) = atBoard then begin
                                                                        Board := TBoard.Create( BoardPlugIns[ k ], inistr );
-                                                                       plugInIndex := k;
+                                                                       plugInIndex := k;
 
                                                                        Break;
                                                                end;
index 9d9a871..92b9f20 100644 (file)
@@ -58,7 +58,7 @@ type
                        var outMajor : DWORD; var outMinor : DWORD;
                        var outRelease : string; var outRevision : DWORD );
                // \8ew\92è\82µ\82½ URL \82ð\82±\82Ì\83v\83\89\83O\83C\83\93\82Å\8eó\82¯\95t\82¯\82é\82©\82Ç\82¤\82©
-               function        AcceptURL( inURL : string ) : Boolean;
+               function        AcceptURL( inURL : string ) : TAcceptType;
 
                //===== TThreadItem \8aÖ\98A
                // TThreadItem \82ª\90\90¬\82³\82ê\82½
@@ -290,13 +290,13 @@ end;
 // *************************************************************************
 function       TBoardPlugIn.AcceptURL(
        inURL : string
-) : Boolean;
+) : TAcceptType;
 begin
 
        if Assigned( FAcceptURL ) then
                Result := FAcceptURL( PChar( inURL ) )
        else
-               Result := False;
+               Result := atNoAccept;
 
 end;
 
index 02a71f5..4ebf161 100644 (file)
@@ -12,6 +12,9 @@ type
        // \83_\83E\83\93\83\8d\81[\83h\82ª\90¬\8c÷\82µ\82½\82©\82Ç\82¤\82©
        TDownloadState = (dsWait, dsWork, dsComplete, dsDiffComplete, dsNotModify, dsAbort, dsError);
 
+       // \8ew\92è\82µ\82½ URL \82ð\82±\82Ì\83v\83\89\83O\83C\83\93\82Å\8eó\82¯\95t\82¯\82é\82©\82Ç\82¤\82©
+       TAcceptType = (atNoAccept, atBBS, atBoard, atThread);
+
        // *************************************************************************
        // \83v\83\89\83O\83C\83\93\82Ì\83o\81[\83W\83\87\83\93
        // *************************************************************************
@@ -28,7 +31,7 @@ type
        // *************************************************************************
        TOnAcceptURL = function(
                inURL : PChar                                           // \94»\92f\82ð\8bÂ\82¢\82Å\82¢\82é URL
-       ): Boolean; stdcall;                    // \8eó\82¯\95t\82¯\82é\82È\82ç True
+       ): TAcceptType; stdcall;        // URL \82Ì\8eí\97Þ
 
        // *************************************************************************
        // \83X\83\8c\88ê\97\97\82Ì URL \82©\82ç\83X\83\8c\83b\83h\82Ì URL \82ð\93±\82«\8fo\82·