+//! \83v\83\8c\83r\83\85\81[\8ag\92£\82Ì\90Ý\92è\83t\83@\83C\83\8b\8eæ\93¾
+function TGikoSys.GetExtpreviewFileName: String;
+begin
+ Result := Setting.GetExtprevieFileName;
+end;
+
+//! \83t\83@\83C\83\8b\96¼\82©\82ç\82Ì\83X\83\8c\83b\83h\8dì\90¬\93ú\82Ì\8eæ\93¾
+function TGikoSys.GetCreateDateFromName(FileName: String): TDateTime;
+var
+ tmp : String;
+ unixtime: Int64;
+begin
+ // \83\8d\83O\83t\83@\83C\83\8b\82Ì\8ag\92£\8eq\82ð\82Í\82¸\82µ\82½\82à\82Ì\82ª\83X\83\8c\8dì\90¬\93ú\8e\9e
+ tmp := ChangeFileExt(FileName, '');
+ if AnsiPos('_', tmp) <> 0 then
+ if AnsiPos('_', tmp) > 9 then
+ tmp := Copy(tmp, 1, AnsiPos('_', tmp)-1)
+ else
+ Delete(tmp, AnsiPos('_', tmp), 1);
+
+ if ( Length(tmp) = 9) and ( tmp[1] = '0' ) then
+ Insert('1', tmp, 1);
+
+ unixtime := StrToInt64Def(tmp, ZERO_DATE);
+ Result := UnixToDateTime(unixtime) + OffsetFromUTC;
+end;
+
+procedure TGikoSys.ShowRefCount(msg: String; unk: IUnknown);
+{$IFDEF DEBUG}
+var
+ count : integer;
+{$ENDIF}
+begin
+ if not Assigned(unk) then
+ Exit;
+
+{$IFDEF DEBUG}
+ try
+ unk._AddRef;
+ count := unk._Release;
+
+ Writeln(msg + ' RefCount=' + IntToStr(count));
+ except
+ Writeln(msg + ' RefCount=exception!!');
+ end;
+{$ENDIF}
+end;
+function TGikoSys.GetBoukenCookie(AURL: String): String;
+var
+ Protocol, Host, Path, Document, Port,Bookmark : String;
+begin
+ Result := '';
+ GikoSys.ParseURI(AURL, Protocol, Host, Path, Document, Port,Bookmark);
+ if ( Length(Host) > 0 ) then begin
+ Result := Setting.GetBoukenCookie(Host);
+ end;
+end;
+procedure TGikoSys.SetBoukenCookie(ACookieValue, ADomain: String);
+begin
+ if ( Length(ADomain) > 0 ) then begin
+ Setting.SetBoukenCookie(ACookieValue, ADomain);
+ end;
+end;
+//! \96`\8c¯\82Ì\8f\91Domain\88ê\97\97\8eæ\93¾
+procedure TGikoSys.GetBoukenDomain(var ADomain: TStringList);
+var
+ i : Integer;
+begin
+ ADomain.Clear;
+ for i := 0 to Setting.BoukenCookieList.Count - 1 do begin
+ ADomain.Add( Setting.BoukenCookieList.Names[i] );
+ end;
+end;
+//! \96`\8c¯\82Ì\8f\91Cookie\8dí\8f\9c
+procedure TGikoSys.DelBoukenCookie(ADomain: String);
+var
+ i : Integer;
+begin
+ for i := 0 to Setting.BoukenCookieList.Count - 1 do begin
+ if ( Setting.BoukenCookieList.Names[i] = ADomain ) then begin
+ Setting.BoukenCookieList.Delete(i);
+ Break;
+ end;
+ end;
+end;
+function TGikoSys.GetBouken(AURL: String; var Domain: String): String;
+var
+ Protocol, Host, Path, Document, Port,Bookmark : String;
+ Cookie : String;
+begin
+ Domain := '';
+ Cookie := '';
+ GikoSys.ParseURI(AURL, Protocol, Host, Path, Document, Port,Bookmark);
+ if ( Length(Host) > 0 ) then begin
+ Setting.GetBouken(Host, Domain, Cookie);
+ Result := Cookie;
+ end;
+end;