diff --git a/source/GCalendar.pas b/source/GCalendar.pas index 8a4ab41..4d4e6b0 100644 --- a/source/GCalendar.pas +++ b/source/GCalendar.pas @@ -215,6 +215,7 @@ TgCaltimesCleaned = class(TPersistent) type TCelenrarEvent = class private + FVersion : shortstring; Fid: string; FEtag: string; FAuth: string; @@ -252,6 +253,7 @@ TCelenrarEvent = class procedure ParseXML(Node: IXMLNode); function Update:boolean; function DeleteThis:boolean; + property Version: shortstring read FVersion; property ID: string read Fid; property Etag: string read FEtag; property PublishedTime: TDateTime read Fpublished; @@ -284,6 +286,7 @@ TCelenrarEvent = class type TCelendar = class private + FVersion: shortstring; FAuth: string; Fid: string; FEtag: string; @@ -320,6 +323,7 @@ TCelendar = class function AddSingleEvent(aEvent: TCelenrarEvent): boolean; function RetrieveEvents: integer; function SendToGoogle(const GoogleAuth: string): boolean; + property Version: shortstring read FVersion; property Auth: string read FAuth write FAuth; property title: string read GetTitle write SetTitle; property Description: string read GetDescription write SetDescription; @@ -346,12 +350,14 @@ TCelendar = class type TGoogleCalendar = class private + FVersion: shortstring; FAccount: TGoogleLogin; FCelendars: TCelendarList; // календари пользователя public constructor Create(const Email, password: string); function Login: boolean; procedure RetriveCelendars(const Owner: boolean); + property Version: shortstring read FVersion; property Account: TGoogleLogin read FAccount write FAccount; property Celendars: TCelendarList read FCelendars; end; @@ -359,6 +365,7 @@ TGoogleCalendar = class function GetGClalNodeType(NodeName: string): TgCalEnum; implementation +unit uVersion; function GetGClalNodeType(NodeName: string): TgCalEnum; var @@ -374,6 +381,7 @@ function GetGClalNodeType(NodeName: string): TgCalEnum; constructor TGoogleCalendar.Create(const Email, password: string); begin inherited Create; + FVersion = cVersion; try FAccount:= TGoogleLogin.Create(Email, password); FAccount.Service := tsCelendar; @@ -457,6 +465,7 @@ function TCelendar.AddSingleEvent(aEvent: TCelenrarEvent): boolean; constructor TCelendar.Create(const ByNode: IXMLNode; aAuth: string); begin inherited Create; + FVersion = cVersion; FAuth := aAuth; FLinks := TCelendarLinksList.Create; FAuthor := TAuthorTag.Create; @@ -1164,6 +1173,7 @@ constructor TCelenrarEvent.Create(const ByNode: IXMLNode; aAuth: string); var Attr: TAttribute; begin inherited Create; + FVersion = cVersion; FAuth := aAuth; Attr.Name:='type'; Attr.Value:='text'; diff --git a/source/GContacts.pas b/source/GContacts.pas index 9a2b1ec..6cf0472 100644 --- a/source/GContacts.pas +++ b/source/GContacts.pas @@ -329,6 +329,7 @@ TContactGroup = class; TContact = class private + FVersion: shortstring; FEtag: string; FId: string; FUpdated: TDateTime; @@ -365,6 +366,7 @@ TContact = class procedure SaveToFile(const FileName:string; FileType:TFileType=tfAtom); procedure LoadFromFile(const FileName:string); + property Version: shortstring read FVersion; property TagTitle: TTextTag read FTitle write FTitle; property TagContent:TTextTag read FContent write FContent; property TagName: TgdName read FName write FName; @@ -511,6 +513,7 @@ function GetContactNodeType(const NodeName: string):TcpTagEnum;inline; function GetContactNodeName(const NodeType:TcpTagEnum):string;inline; implementation +unit uVersion; function GetContactNodeName(const NodeType:TcpTagEnum):string;inline; begin @@ -1323,6 +1326,7 @@ procedure TContact.Clear; constructor TContact.Create(byNode: TXMLNode); begin inherited Create(); + FVersion = cVersion; FLinks:=TList.Create; FEmails:= TList.Create; FPhones:= TList.Create; diff --git a/source/GoogleLogin.pas b/source/GoogleLogin.pas index 606402f..f247241 100644 --- a/source/GoogleLogin.pas +++ b/source/GoogleLogin.pas @@ -56,6 +56,7 @@ interface type TGoogleLogin = class private + FVersion : shortstring; //регистрационные данные FAccountType : TAccountType; FLastResult : TLoginResult; @@ -86,6 +87,7 @@ TGoogleLogin = class constructor Create(const aEmail, aPassword: string); function Login(aLoginToken:string='';aLoginCaptcha:string=''):TLoginResult; procedure Disconnect;//удаляет все данные по авторизации + property Version: shortstring read FVersion; property AccountType: TAccountType read FAccountType write FAccountType; property LastResult: TLoginResult read FLastResult; property LastResultText:string read GetResultText; @@ -104,6 +106,9 @@ TGoogleLogin = class implementation +uses uVersion; + + { TGoogleLogin } procedure TGoogleLogin.Disconnect; @@ -122,6 +127,7 @@ procedure TGoogleLogin.Disconnect; constructor TGoogleLogin.Create(const aEmail, aPassword: string); begin inherited Create; + FVersion = cVersion; if (Length(Trim(aEmail))>0)and(Length(Trim(aPassword))>0) then begin FEmail:=aEmail; diff --git a/source/uVersion.pas b/source/uVersion.pas new file mode 100644 index 0000000..a62e75d --- /dev/null +++ b/source/uVersion.pas @@ -0,0 +1,11 @@ +п»їunit uVersion; + +interface + +const + cVersion = '0.0.1'; + +implementation + + +end. \ No newline at end of file