Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad <vlad383@mail.ru>
  • Loading branch information
Vlad383 committed Jul 30, 2010
1 parent 2a3df3a commit 623a8f7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 141 deletions.
118 changes: 0 additions & 118 deletions demos/contacts_demo/contacts.dproj
@@ -1,4 +1,3 @@
<<<<<<< HEAD:demos/contacts_demo/contacts.dproj
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{901BDCD7-6F86-4C0E-98C9-DB2281620CAE}</ProjectGuid>
Expand Down Expand Up @@ -143,120 +142,3 @@
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
</Project>
=======
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{9F62CA46-D0D3-4082-A250-5A01F95A583F}</ProjectGuid>
<ProjectVersion>12.0</ProjectVersion>
<MainSource>CelendarAPI.dpr</MainSource>
<Config Condition="'$(Config)'==''">Debug</Config>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DependencyCheckOutputName>CelendarAPI.exe</DCC_DependencyCheckOutputName>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_Platform>x86</DCC_Platform>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>false</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="CelendarAPI.dpr">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="main.pas">
<Form>Form1</Form>
</DCCReference>
<DCCReference Include="..\GCalendar.pas"/>
<DCCReference Include="..\GDataCommon.pas"/>
<DCCReference Include="..\GHelper.pas"/>
<DCCReference Include="..\GoogleLogin.pas"/>
<DCCReference Include="..\GData.pas"/>
<DCCReference Include="newevent.pas">
<Form>Form2</Form>
</DCCReference>
<DCCReference Include="..\..\Utils\NativeXml.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">CelendarAPI.dpr</Source>
</Source>
<Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1049</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
</Delphi.Personality>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
</Project>
>>>>>>> remotes/origin/NMD:demos/CelendarAPI.dproj
2 changes: 1 addition & 1 deletion demos/contacts_demo/main.dfm
Expand Up @@ -451,7 +451,7 @@ object Form3: TForm3
Left = 96
Top = 236
Bitmap = {
494C01010C001C00780120002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
494C01010C001C00840120002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000800000008000000001002000000000000000
0100000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Expand Down
12 changes: 4 additions & 8 deletions packages/gmail_pack/GMailSMTP.pas
Expand Up @@ -91,7 +91,6 @@ TGMailSMTP = class(TComponent)
FFiles : TStrings; //прикрепленные файлы
FRecipients: TStrings;//получатели
FMsg : TMimeMess;
FMIMEPart : TMimePart;
FOnStatus : THookSocketStatus;
procedure SetFiles(Value: TStrings);
procedure SetRecepients(Value: TStrings);
Expand All @@ -106,7 +105,6 @@ TGMailSMTP = class(TComponent)
procedure Clear;
//для работы c объектами Synapse
property GMessage:TMimeMess read FMsg write FMsg;
property MIMEPart:TMimePart read FMIMEPart write FMIMEPart;
published
property Login: string read FLogin write FLogin;
property Password: string read FPassword write FPassword;
Expand Down Expand Up @@ -136,7 +134,7 @@ function TGMailSMTP.AddHTML(const aHTML: AnsiString): boolean;
begin
Result:=false;
try
Part:= FMsg.AddPart(FMIMEPart);
Part:= FMsg.AddPart(FMsg.MessagePart);
with Part do
begin
DecodedLines.Write(Pointer(aHTML)^, Length(aHTML) * SizeOf(AnsiChar));
Expand All @@ -160,7 +158,7 @@ function TGMailSMTP.AddText(const aText: AnsiString): boolean;
begin
Result:=false;
try
Part:= FMsg.AddPart(FMIMEPart);
Part:= FMsg.AddPart(FMsg.MessagePart);
with Part do
begin
DecodedLines.Write(Pointer(aText)^, Length(aText) * SizeOf(AnsiChar));
Expand All @@ -182,7 +180,6 @@ function TGMailSMTP.AddText(const aText: AnsiString): boolean;
procedure TGMailSMTP.Clear;
begin
FMsg.Clear;
FMIMEPart.Clear;
FFiles.Clear;
FRecipients.Clear;
end;
Expand All @@ -193,7 +190,7 @@ constructor TGMailSMTP.Create(AOwner: TComponent);
FFiles:=TStringList.Create;
FRecipients:=TStringList.Create;
FMsg:=TMimeMess.Create;
FMIMEPart:=FMsg.AddPartMultipart('alternate',nil);
FMsg.AddPartMultipart('alternate',nil);
FHost:=GmailHost;
FPort:=GmailPort;
end;
Expand Down Expand Up @@ -229,13 +226,12 @@ function TGMailSMTP.SendMessage(const aSubject: string; aClear:boolean): boolean
FMsg.Header.ToList.Assign(FRecipients);
//добавляем файлы
for i:=0 to FFiles.Count - 1 do
FMsg.AddPartBinaryFromFile(FFiles[i],FMIMEPart);
FMsg.AddPartBinaryFromFile(FFiles[i],FMsg.MessagePart);
MailTo:='';
FRecipients.Delimiter:=',';
MailTo:=FRecipients.DelimitedText;

FMsg.EncodeMessage;

SMTP := TSMTPSend.Create;
SMTP.AutoTLS:=True;
SMTP.TargetHost := Trim(FHost);
Expand Down
22 changes: 16 additions & 6 deletions source/GContacts.pas
Expand Up @@ -1201,23 +1201,26 @@ TGoogleContact = class(TComponent)
procedure LoadContactsFromFile(const FileName: string);


property Auth: string read FAuth write SetAuth;//Ключ Auth для авторизации в сервисе. Может быть получен с использованием компонента TClientLogin
property Gmail: string read FEmail write SetGmail;//адрес почтового ящика на GMail. Используется для работы с группами и контактами
property Groups: TList<TContactGroup>read FGroups write FGroups;//список все групп контактов пользователя
property Contacts: TList<TContact>read FContacts write FContacts;//список всех контактов пользователя
property ContactByGroupIndex[Group: string; I: integer]
: TContact read GetContact;//контакт, находящийся в группе с именем
//<b>Group</b> и имеющий в этой группе индекс <b>i</b>
property ContactsByGroup[GroupName: string]
: TList<TContact>read GetContactsByGroup;//список всех контактов, находящихся в группе с именем <b>GroupName</b>
property MaximumResults
: integer read FMaximumResults write SetMaximumResults;// максимальное количество записей контактов возвращаемое в одном фиде
property ContactsNames: TStrings read GetContactNames;// список имен контактов
property GroupsNames: TStrings read GetGropsNames;// список имен групп контактов

published
property Auth: string read FAuth write SetAuth;//Ключ Auth для авторизации в сервисе. Может быть получен с использованием компонента TClientLogin
property Gmail: string read FEmail write SetGmail;//адрес почтового ящика на GMail. Используется для работы с группами и контактами

property MaximumResults: integer read FMaximumResults write SetMaximumResults;// максимальное количество записей контактов возвращаемое в одном фиде
property StartIndex: integer read FStartIndex write SetStartIndex;// начальный номер контакта с которого начинать принятие данных
property UpdatesMin: TDateTime read FUpdatesMin write SetUpdatesMin;// нижняя граница обновления контактов
property ShowDeleted: boolean read FShowDeleted write SetShowDeleted;// определяет будут ли показываться в списке удаленные контакты
property SortOrder: TSortOrder read FSortOrder write SetSortOrder;// сортировка контактов
property ContactsNames: TStrings read GetContactNames;// список имен контактов
property GroupsNames: TStrings read GetGropsNames;// список имен групп контактов


property OnRetriveXML: TOnRetriveXML read FOnRetriveXML write FOnRetriveXML;// начало загрузки XML-документа с сервера
property OnBeginParse: TOnBeginParse read FOnBeginParse write FOnBeginParse;// старт парсинга XML
Expand All @@ -1230,8 +1233,15 @@ function GetContactNodeType(const NodeName: string): TcpTagEnum; inline;
// получение имени узла по его типу
function GetContactNodeName(const NodeType: TcpTagEnum): string; inline;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('webdelphi.ru',[TGoogleContact]);
end;

function GetContactNodeName(const NodeType: TcpTagEnum): string; inline;
begin
Result := GetEnumName(TypeInfo(TcpTagEnum), ord(NodeType));
Expand Down
3 changes: 1 addition & 2 deletions source/GDataCommon.pas
@@ -1,5 +1,4 @@
<<<<<<< HEAD
{ Модуль содержит наиболее общие классы для работы с Google API, а также
{ Модуль содержит наиболее общие классы для работы с Google API, а также
классы и методы для работы с основой всех API - GData API.
Этот содуль должен подключаться в раздел uses всех прочих модулей, реализующих работу
с различными Google API}
Expand Down
3 changes: 1 addition & 2 deletions source/GHelper.pas
@@ -1,5 +1,4 @@
<<<<<<< HEAD
unit GHelper;
unit GHelper;

interface

Expand Down
3 changes: 1 addition & 2 deletions source/GoogleLogin.pas
@@ -1,5 +1,4 @@
<<<<<<< HEAD
{ ******************************************************* }
{ ******************************************************* }
{ }
{ Delphi & Google API }
{ }
Expand Down
3 changes: 1 addition & 2 deletions source/uLanguage.pas
@@ -1,5 +1,4 @@
<<<<<<< HEAD
unit uLanguage;
unit uLanguage;

interface

Expand Down

0 comments on commit 623a8f7

Please sign in to comment.