├── .gitignore ├── AndroidManifest.template.xml ├── Demos ├── FMX │ └── ContactsDemo │ │ ├── APPIDS.INC │ │ ├── AndroidManifest.template.xml │ │ ├── Demos.FMX.Contacts.Project.deployproj │ │ ├── Demos.FMX.Contacts.Project.dpr │ │ ├── Demos.FMX.Contacts.Project.dproj │ │ ├── Demos.FMX.Contacts.Project.res │ │ ├── Demos.FMX.Contacts.fmx │ │ ├── Demos.FMX.Contacts.pas │ │ ├── Entitlement.TemplateOSX32.xml │ │ ├── Entitlement.TemplateiOS.xml │ │ ├── FmxContactsDemo.res │ │ ├── REST.Authenticator.OAuth.WebForm.FMX.fmx │ │ ├── info.plist.TemplateOSX.xml │ │ └── info.plist.TemplateiOS.xml └── VCL │ └── ContactsDemo │ ├── APPIDS.INC │ ├── Demos.VCL.Contacts.Project.dpr │ ├── Demos.VCL.Contacts.Project.dproj │ ├── Demos.VCL.Contacts.Project.res │ ├── Demos.VCL.Contacts.dfm │ ├── Demos.VCL.Contacts.pas │ └── VclContactsDemo.res ├── FMX.MyCloudDataRestClient.dpk ├── FMX.MyCloudDataRestClient.dproj ├── FMX.MyCloudDataRestClient.res ├── FMX.TMS.myCloudDataRestClient.pas ├── FMX.TMS.myCloudDataRestClientReg.dcr ├── FMX.TMS.myCloudDataRestClientReg.pas ├── FMXTMSMyCloudDataRestClient.res ├── LICENSE ├── MyCloudDataRestClientPack.res ├── README.md ├── REST.TMS.myCloudDataRestClient.Data.pas ├── REST.TMS.myCloudDataRestClient.Data.pas.rej ├── REST.TMS.myCloudDataRestClient.pas ├── REST.TMSMyCloudDataRestClient.dpk ├── REST.TMSMyCloudDataRestClient.dproj ├── REST.TMSMyCloudDataRestClient.res ├── TMS myCloudData RESTClient.groupproj ├── TMSMyCloudDataRestClient.res ├── VCL.TMS.myCloudDataRestClient.pas ├── VCL.TMS.myCloudDataRestClientReg.dcr ├── VCL.TMS.myCloudDataRestClientReg.pas ├── VCL.TMSMyCloudDataRestClient.dpk ├── VCL.TMSMyCloudDataRestClient.dproj ├── VCL.TMSMyCloudDataRestClient.res └── VCLTMSMyCloudDataRestClient.res /.gitignore: -------------------------------------------------------------------------------- 1 | # Uncomment these types if you want even more clean repository. But be careful. 2 | # It can make harm to an existing project source. Read explanations below. 3 | # 4 | # Resource files are binaries containing manifest, project icon and version info. 5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. 6 | #*.res 7 | # 8 | # Type library file (binary). In old Delphi versions it should be stored. 9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored. 10 | #*.tlb 11 | # 12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7. 13 | # Uncomment this if you are not using diagrams or use newer Delphi version. 14 | #*.ddp 15 | # 16 | # Visual LiveBindings file. Added in Delphi XE2. 17 | # Uncomment this if you are not using LiveBindings Designer. 18 | #*.vlb 19 | # 20 | # Deployment Manager configuration file for your project. Added in Delphi XE2. 21 | # Uncomment this if it is not mobile development and you do not use remote debug feature. 22 | #*.deployproj 23 | # 24 | # C++ object files produced when C/C++ Output file generation is configured. 25 | # Uncomment this if you are not using external objects (zlib library for example). 26 | #*.obj 27 | # 28 | 29 | # Delphi compiler-generated binaries (safe to delete) 30 | *.exe 31 | *.dll 32 | *.bpl 33 | *.bpi 34 | *.dcp 35 | *.so 36 | *.apk 37 | *.drc 38 | *.map 39 | *.dres 40 | *.rsm 41 | *.tds 42 | *.dcu 43 | *.lib 44 | *.a 45 | *.o 46 | *.ocx 47 | 48 | # Delphi autogenerated files (duplicated info) 49 | *.cfg 50 | *.hpp 51 | *Resource.rc 52 | 53 | # Delphi local files (user-specific info) 54 | *.local 55 | *.identcache 56 | *.projdata 57 | *.tvsconfig 58 | *.dsk 59 | 60 | # Delphi history and backups 61 | __history/ 62 | __recovery/ 63 | *.~* 64 | 65 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi) 66 | *.stat 67 | out* 68 | ModelSupport_*/ 69 | LibrarySupport/ 70 | Win32/ 71 | TMSAPPIDS.INC 72 | Demos/FMX/ContactsDemo/iOSDevice64/ 73 | Demos/FMX/ContactsDemo/OSX32/ 74 | Demos/FMX/ContactsDemo/Android/ 75 | -------------------------------------------------------------------------------- /AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/APPIDS.INC: -------------------------------------------------------------------------------- 1 | //please specify the keys here 2 | 3 | const 4 | MCDClientId = ''; 5 | MCDClientSecret = ''; 6 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Demos.FMX.Contacts.Project.dpr: -------------------------------------------------------------------------------- 1 | program Demos.FMX.Contacts.Project; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Demos.FMX.Contacts in 'Demos.FMX.Contacts.pas' {ContactsDemoForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TContactsDemoForm, ContactsDemoForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Demos.FMX.Contacts.Project.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/Demos/FMX/ContactsDemo/Demos.FMX.Contacts.Project.res -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Demos.FMX.Contacts.fmx: -------------------------------------------------------------------------------- 1 | object ContactsDemoForm: TContactsDemoForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'MyCloudData - FMX Contacts DEMO application' 5 | ClientHeight = 505 6 | ClientWidth = 822 7 | Position = Designed 8 | FormFactor.Width = 320 9 | FormFactor.Height = 480 10 | FormFactor.Devices = [Desktop] 11 | OnCreate = FormCreate 12 | DesignerMasterStyle = 0 13 | object DetailsGroupBox: TGroupBox 14 | Position.X = 265.000000000000000000 15 | Position.Y = 128.000000000000000000 16 | Size.Width = 288.000000000000000000 17 | Size.Height = 361.000000000000000000 18 | Size.PlatformDefault = False 19 | Text = 'Contact details' 20 | TabOrder = 5 21 | object EmailTextBox: TEdit 22 | Touch.InteractiveGestures = [LongTap, DoubleTap] 23 | TabOrder = 1 24 | Position.X = 16.000000000000000000 25 | Position.Y = 96.000000000000000000 26 | Size.Width = 257.000000000000000000 27 | Size.Height = 22.000000000000000000 28 | Size.PlatformDefault = False 29 | end 30 | object DeleteContactButton: TButton 31 | Position.X = 193.000000000000000000 32 | Position.Y = 312.000000000000000000 33 | Size.Width = 80.000000000000000000 34 | Size.Height = 33.000000000000000000 35 | Size.PlatformDefault = False 36 | TabOrder = 7 37 | Text = 'Delete' 38 | OnClick = DeleteContactButtonClick 39 | end 40 | object AddContactButton: TButton 41 | Position.X = 17.000000000000000000 42 | Position.Y = 312.000000000000000000 43 | Size.Width = 80.000000000000000000 44 | Size.Height = 33.000000000000000000 45 | Size.PlatformDefault = False 46 | TabOrder = 5 47 | Text = 'Add' 48 | OnClick = AddContactButtonClick 49 | end 50 | object BirthDatePicker: TDateEdit 51 | Date = 42710.000000000000000000 52 | Position.X = 16.000000000000000000 53 | Position.Y = 208.000000000000000000 54 | Size.Width = 257.000000000000000000 55 | Size.Height = 22.000000000000000000 56 | Size.PlatformDefault = False 57 | TabOrder = 3 58 | end 59 | object NameTextBox: TEdit 60 | Touch.InteractiveGestures = [LongTap, DoubleTap] 61 | TabOrder = 0 62 | Position.X = 16.000000000000000000 63 | Position.Y = 40.000000000000000000 64 | Size.Width = 257.000000000000000000 65 | Size.Height = 22.000000000000000000 66 | Size.PlatformDefault = False 67 | end 68 | object UpdateContactButton: TButton 69 | Position.X = 105.000000000000000000 70 | Position.Y = 312.000000000000000000 71 | Size.Width = 80.000000000000000000 72 | Size.Height = 33.000000000000000000 73 | Size.PlatformDefault = False 74 | TabOrder = 6 75 | Text = 'Update' 76 | OnClick = UpdateContactButtonClick 77 | end 78 | object GenderSelectRadioGroup: TGroupBox 79 | Position.X = 16.000000000000000000 80 | Position.Y = 128.000000000000000000 81 | Size.Width = 257.000000000000000000 82 | Size.Height = 49.000000000000000000 83 | Size.PlatformDefault = False 84 | Text = 'Gender' 85 | TabOrder = 2 86 | object GenderSelectMaleRadioButton: TRadioButton 87 | GroupName = 'GenderSelect' 88 | Position.X = 17.000000000000000000 89 | Position.Y = 22.000000000000000000 90 | Size.Width = 56.000000000000000000 91 | Size.Height = 19.000000000000000000 92 | Size.PlatformDefault = False 93 | TabOrder = 0 94 | Text = 'Male' 95 | end 96 | object GenderSelectFemaleRadioButton: TRadioButton 97 | GroupName = 'GenderSelect' 98 | Position.X = 89.000000000000000000 99 | Position.Y = 22.000000000000000000 100 | Size.Width = 88.000000000000000000 101 | Size.Height = 19.000000000000000000 102 | Size.PlatformDefault = False 103 | TabOrder = 1 104 | Text = 'Female' 105 | end 106 | end 107 | object NameLabel: TLabel 108 | Position.X = 16.000000000000000000 109 | Position.Y = 16.000000000000000000 110 | Size.Width = 120.000000000000000000 111 | Size.Height = 25.000000000000000000 112 | Size.PlatformDefault = False 113 | Text = 'Name' 114 | end 115 | object EmailLabel: TLabel 116 | Position.X = 16.000000000000000000 117 | Position.Y = 72.000000000000000000 118 | Size.Width = 120.000000000000000000 119 | Size.Height = 25.000000000000000000 120 | Size.PlatformDefault = False 121 | Text = 'Email' 122 | end 123 | object BirthDateLabel: TLabel 124 | Position.X = 16.000000000000000000 125 | Position.Y = 184.000000000000000000 126 | Size.Width = 120.000000000000000000 127 | Size.Height = 25.000000000000000000 128 | Size.PlatformDefault = False 129 | Text = 'Date of birth' 130 | end 131 | object RelationShipGroupBox: TGroupBox 132 | Position.X = 16.000000000000000000 133 | Position.Y = 240.000000000000000000 134 | Size.Width = 257.000000000000000000 135 | Size.Height = 57.000000000000000000 136 | Size.PlatformDefault = False 137 | Text = 'Relationship' 138 | TabOrder = 4 139 | object IsFriendCheckbox: TCheckBox 140 | Position.X = 17.000000000000000000 141 | Position.Y = 25.000000000000000000 142 | TabOrder = 0 143 | Text = 'Friend' 144 | end 145 | end 146 | end 147 | object DisconnectButton: TButton 148 | Position.X = 136.000000000000000000 149 | Position.Y = 16.000000000000000000 150 | Size.Width = 97.000000000000000000 151 | Size.Height = 33.000000000000000000 152 | Size.PlatformDefault = False 153 | TabOrder = 1 154 | Text = 'Disconnect' 155 | OnClick = DisconnectButtonClick 156 | end 157 | object ConnectButton: TButton 158 | Position.X = 24.000000000000000000 159 | Position.Y = 16.000000000000000000 160 | Size.Width = 97.000000000000000000 161 | Size.Height = 33.000000000000000000 162 | Size.PlatformDefault = False 163 | TabOrder = 0 164 | Text = 'Connect' 165 | OnClick = ConnectButtonClick 166 | end 167 | object ContactListGroupBox: TGroupBox 168 | Position.X = 24.000000000000000000 169 | Position.Y = 128.000000000000000000 170 | Size.Width = 233.000000000000000000 171 | Size.Height = 361.000000000000000000 172 | Size.PlatformDefault = False 173 | Text = 'My contacts' 174 | TabOrder = 4 175 | object ContactsListBox: TListBox 176 | Position.X = 8.000000000000000000 177 | Position.Y = 24.000000000000000000 178 | Size.Width = 217.000000000000000000 179 | Size.Height = 321.000000000000000000 180 | Size.PlatformDefault = False 181 | TabOrder = 3 182 | OnClick = ContactsListBoxClick 183 | DisableFocusEffect = True 184 | DefaultItemStyles.ItemStyle = '' 185 | DefaultItemStyles.GroupHeaderStyle = '' 186 | DefaultItemStyles.GroupFooterStyle = '' 187 | OnChange = ContactsListBoxClick 188 | Viewport.Width = 213.000000000000000000 189 | Viewport.Height = 317.000000000000000000 190 | end 191 | end 192 | object PictureGroupBox: TGroupBox 193 | Position.X = 558.000000000000000000 194 | Position.Y = 128.000000000000000000 195 | Size.Width = 243.000000000000000000 196 | Size.Height = 361.000000000000000000 197 | Size.PlatformDefault = False 198 | Text = 'Contact image' 199 | TabOrder = 6 200 | object PictureOpenDialog: TOpenDialog 201 | Left = 720 202 | Top = 24 203 | end 204 | object InsertPictureButton: TButton 205 | Position.X = 17.000000000000000000 206 | Position.Y = 312.000000000000000000 207 | Size.Width = 88.000000000000000000 208 | Size.Height = 33.000000000000000000 209 | Size.PlatformDefault = False 210 | TabOrder = 0 211 | Text = 'Insert Picture' 212 | OnClick = InsertPictureButtonClick 213 | end 214 | object RemovePictureButton: TButton 215 | Enabled = False 216 | Position.X = 121.000000000000000000 217 | Position.Y = 312.000000000000000000 218 | Size.Width = 104.000000000000000000 219 | Size.Height = 33.000000000000000000 220 | Size.PlatformDefault = False 221 | TabOrder = 1 222 | Text = 'Remove Picture' 223 | OnClick = RemovePictureButtonClick 224 | end 225 | object ContactImage: TImage 226 | MultiResBitmap = < 227 | item 228 | end> 229 | Position.X = 8.000000000000000000 230 | Position.Y = 24.000000000000000000 231 | Size.Width = 225.000000000000000000 232 | Size.Height = 273.000000000000000000 233 | Size.PlatformDefault = False 234 | end 235 | object BlobsNotEnabledWarning: TLabel 236 | StyledSettings = [Family] 237 | Position.X = 16.000000000000000000 238 | Position.Y = 24.000000000000000000 239 | Size.Width = 217.000000000000000000 240 | Size.Height = 17.000000000000000000 241 | Size.PlatformDefault = False 242 | TextSettings.Font.Size = 10.000000000000000000 243 | TextSettings.Font.StyleExt = {00040000000200000004000000} 244 | TextSettings.FontColor = claDimgray 245 | Text = 'Blob fields are not available for free accounts.' 246 | end 247 | end 248 | object GenderFilterRadioGroup: TGroupBox 249 | Position.X = 24.000000000000000000 250 | Position.Y = 64.000000000000000000 251 | Size.Width = 233.000000000000000000 252 | Size.Height = 57.000000000000000000 253 | Size.PlatformDefault = False 254 | Text = 'Filter by gender' 255 | TabOrder = 7 256 | object GenderFilterMaleRadioButton: TRadioButton 257 | GroupName = 'GenderFilter' 258 | Position.X = 78.000000000000000000 259 | Position.Y = 23.000000000000000000 260 | Size.Width = 67.000000000000000000 261 | Size.Height = 19.000000000000000000 262 | Size.PlatformDefault = False 263 | TabOrder = 1 264 | Text = 'Male' 265 | OnChange = GenderFilterRadioOnChange 266 | end 267 | object GenderFilterFemaleRadioButton: TRadioButton 268 | GroupName = 'GenderFilter' 269 | Position.X = 9.000000000000000000 270 | Position.Y = 23.000000000000000000 271 | Size.Width = 64.000000000000000000 272 | Size.Height = 19.000000000000000000 273 | Size.PlatformDefault = False 274 | TabOrder = 0 275 | Text = 'Female' 276 | OnChange = GenderFilterRadioOnChange 277 | end 278 | object GenderFilterAllRadioButton: TRadioButton 279 | GroupName = 'GenderFilter' 280 | Position.X = 147.000000000000000000 281 | Position.Y = 23.000000000000000000 282 | Size.Width = 46.000000000000000000 283 | Size.Height = 19.000000000000000000 284 | Size.PlatformDefault = False 285 | TabOrder = 2 286 | Text = 'All' 287 | OnChange = GenderFilterRadioOnChange 288 | end 289 | end 290 | object ConnectedAsLabel: TLabel 291 | StyledSettings = [Family, Style, FontColor] 292 | Position.X = 256.000000000000000000 293 | Position.Y = 16.000000000000000000 294 | TextSettings.Font.Size = 10.000000000000000000 295 | Text = 'Connected As :' 296 | end 297 | object ConnectedAsValueLabel: TLabel 298 | StyledSettings = [Family, FontColor] 299 | Position.X = 328.000000000000000000 300 | Position.Y = 17.000000000000000000 301 | Size.Width = 265.000000000000000000 302 | Size.Height = 14.000000000000000000 303 | Size.PlatformDefault = False 304 | TextSettings.Font.Size = 10.000000000000000000 305 | TextSettings.Font.StyleExt = {00070000000000000004000000} 306 | Text = 'not connected' 307 | end 308 | object AccountTypeLabel: TLabel 309 | StyledSettings = [Family, Style, FontColor] 310 | Position.X = 256.000000000000000000 311 | Position.Y = 32.000000000000000000 312 | TextSettings.Font.Size = 10.000000000000000000 313 | Text = 'Account type :' 314 | end 315 | object AccountTypeValueLabel: TLabel 316 | StyledSettings = [Family, FontColor] 317 | Position.X = 328.000000000000000000 318 | Position.Y = 33.000000000000000000 319 | Size.Width = 265.000000000000000000 320 | Size.Height = 14.000000000000000000 321 | Size.PlatformDefault = False 322 | TextSettings.Font.Size = 10.000000000000000000 323 | TextSettings.Font.StyleExt = {00070000000000000004000000} 324 | Text = 'not connected' 325 | end 326 | end 327 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Demos.FMX.Contacts.pas: -------------------------------------------------------------------------------- 1 | unit Demos.FMX.Contacts; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, 7 | System.Types, 8 | System.UITypes, 9 | System.Classes, 10 | System.Variants, 11 | FMX.Types, 12 | FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 13 | REST.TMS.myCloudDataRestClient.Data, 14 | REST.TMS.myCloudDataRestClient, 15 | FMX.TMS.myCloudDataRestClient, 16 | FMX.Controls.Presentation, 17 | FMX.StdCtrls, 18 | FMX.Layouts, 19 | FMX.ListBox, FMX.Edit, FMX.DateTimeCtrls, FMX.Objects; 20 | 21 | type 22 | TContactsDemoForm = class(TForm) 23 | ConnectButton: TButton; 24 | DisconnectButton: TButton; 25 | GenderFilterRadioGroup: TGroupBox; 26 | GenderFilterMaleRadioButton: TRadioButton; 27 | GenderFilterFemaleRadioButton: TRadioButton; 28 | GenderFilterAllRadioButton: TRadioButton; 29 | ContactsListBox: TListBox; 30 | ContactImage: TImage; 31 | AddContactButton: TButton; 32 | UpdateContactButton: TButton; 33 | DeleteContactButton: TButton; 34 | NameTextBox: TEdit; 35 | NameLabel: TLabel; 36 | EmailLabel: TLabel; 37 | EmailTextBox: TEdit; 38 | BirthDatePicker: TDateEdit; 39 | GenderSelectRadioGroup: TGroupBox; 40 | IsFriendCheckbox: TCheckBox; 41 | GenderSelectMaleRadioButton: TRadioButton; 42 | GenderSelectFemaleRadioButton: TRadioButton; 43 | InsertPictureButton: TButton; 44 | RemovePictureButton: TButton; 45 | PictureOpenDialog: TOpenDialog; 46 | ContactListGroupBox: TGroupBox; 47 | DetailsGroupBox: TGroupBox; 48 | PictureGroupBox: TGroupBox; 49 | BirthDateLabel: TLabel; 50 | RelationShipGroupBox: TGroupBox; 51 | ConnectedAsLabel: TLabel; 52 | ConnectedAsValueLabel: TLabel; 53 | AccountTypeLabel: TLabel; 54 | AccountTypeValueLabel: TLabel; 55 | BlobsNotEnabledWarning: TLabel; 56 | 57 | procedure FormCreate(Sender: TObject); 58 | procedure ConnectButtonClick(Sender: TObject); 59 | procedure DisconnectButtonClick(Sender: TObject); 60 | procedure ConnectedStatusChanged(ASender: TObject; const AConnected: Boolean); 61 | procedure ContactsListBoxClick(Sender: TObject); 62 | procedure AddContactButtonClick(Sender: TObject); 63 | procedure UpdateContactButtonClick(Sender: TObject); 64 | procedure DeleteContactButtonClick(Sender: TObject); 65 | procedure InsertPictureButtonClick(Sender: TObject); 66 | procedure RemovePictureButtonClick(Sender: TObject); 67 | procedure GenderFilterRadioOnChange(Sender: TObject); 68 | private 69 | FIsConnected: Boolean; 70 | FSelectedContact: TmyCloudDataEntity; 71 | FGenderFilter: integer; 72 | FContacstTable: TmyCloudDataTable; 73 | FContacts: TmyCloudDataEntities; 74 | MyCloudData: TFMXmyCloudDataRESTClient; 75 | 76 | procedure SetSelectedContact(AContactEntity: TmyCloudDataEntity); 77 | function GetApplicationInitialized: Boolean; 78 | property IsConnected: Boolean read FIsConnected write FIsConnected; 79 | property ApplicationInitialized: Boolean read GetApplicationInitialized; 80 | property ContactsTable: TmyCloudDataTable read FContacstTable write FContacstTable; 81 | property Contacts: TmyCloudDataEntities read FContacts write FContacts; 82 | property SelectedContact: TmyCloudDataEntity read FSelectedContact write SetSelectedContact; 83 | function BlobFieldsAreEnabled: Boolean; 84 | procedure InitializeComponents; 85 | procedure ToggleComponents; 86 | procedure InitializeContactsTable; 87 | procedure GetUserDetails; 88 | procedure LoadContacts; 89 | procedure UpdateContactsList; 90 | procedure ClearContactDetails; 91 | procedure LoadContactDetails; 92 | procedure LoadContactImage; 93 | procedure UpdateContactFromUI(AContact: TmyCloudDataEntity); 94 | procedure ShowErrorMessage(AMessage: string; AError: Exception); 95 | public 96 | destructor Destroy; override; 97 | end; 98 | 99 | var 100 | ContactsDemoForm: TContactsDemoForm; 101 | 102 | implementation 103 | 104 | {$R *.fmx} 105 | // TO RUN THIS DEMO APPLICATION, PLEASE USE A VALID INCLUDE FILE THAT CONTAINS 106 | // THE APPLICATION KEY & SECRET FOR THE MyCloudData APPLICATION YOU WANT TO USE 107 | // STRUCTURE OF THIS .INC FILE SHOULD BE 108 | // 109 | // const 110 | // MCDClientId = 'xxxxxxxxx'; 111 | // MCDClientSecret = 'yyyyyyyy'; 112 | 113 | {$I APPIDS.INC} 114 | 115 | procedure TContactsDemoForm.AddContactButtonClick(Sender: TObject); 116 | var 117 | LContact: TmyCloudDataEntity; 118 | begin 119 | LContact := ContactsTable.Entities.CreateEntity; 120 | UpdateContactFromUI(LContact); 121 | ContactsTable.Entities.Save; 122 | SelectedContact := LContact; 123 | UpdateContactsList; 124 | end; 125 | 126 | function TContactsDemoForm.BlobFieldsAreEnabled: Boolean; 127 | begin 128 | Result := IsConnected AND MyCloudData.CurrentUser.CanUseBlobFields; 129 | end; 130 | 131 | procedure TContactsDemoForm.ClearContactDetails; 132 | begin 133 | NameTextBox.Text := ''; 134 | EmailTextBox.Text := ''; 135 | GenderSelectMaleRadioButton.IsChecked := false; 136 | GenderSelectFemaleRadioButton.IsChecked := false; 137 | BirthDatePicker.DateTime := Now; 138 | IsFriendCheckbox.IsChecked := false; 139 | ContactImage.Bitmap := nil; 140 | end; 141 | 142 | procedure TContactsDemoForm.ConnectButtonClick(Sender: TObject); 143 | begin 144 | try 145 | MyCloudData.Connect; 146 | except 147 | on E: Exception do 148 | ShowErrorMessage('Failed to connect', E); 149 | end; 150 | end; 151 | 152 | procedure TContactsDemoForm.ContactsListBoxClick(Sender: TObject); 153 | var 154 | LContact: TmyCloudDataEntity; 155 | begin 156 | if ContactsListBox.ItemIndex >= 0 then 157 | begin 158 | LContact := ContactsListBox.items.Objects[ContactsListBox.ItemIndex] as TmyCloudDataEntity; 159 | if not(LContact = nil) then 160 | begin 161 | SelectedContact := LContact; 162 | end 163 | else 164 | begin 165 | SelectedContact := nil; 166 | end; 167 | end; 168 | end; 169 | 170 | procedure TContactsDemoForm.DeleteContactButtonClick(Sender: TObject); 171 | begin 172 | if not(SelectedContact = nil) then 173 | begin 174 | ContactsTable.Entities.RemoveEntity(SelectedContact.ID); 175 | ContactsTable.Entities.Save; 176 | UpdateContactsList; 177 | end; 178 | end; 179 | 180 | destructor TContactsDemoForm.Destroy; 181 | begin 182 | if Assigned(MyCloudData) then 183 | begin 184 | MyCloudData.Free; 185 | end; 186 | inherited; 187 | end; 188 | 189 | procedure TContactsDemoForm.DisconnectButtonClick(Sender: TObject); 190 | begin 191 | MyCloudData.Disconnect; 192 | MyCloudData.ClearToken; 193 | end; 194 | 195 | procedure TContactsDemoForm.FormCreate(Sender: TObject); 196 | begin 197 | ReportMemoryLeaksOnShutdown := true; 198 | 199 | MyCloudData := TFMXmyCloudDataRESTClient.Create(self); 200 | 201 | MyCloudData.PersistTokens.Location := plIniFile; 202 | MyCloudData.PersistTokens.Section := 'test_section'; 203 | MyCloudData.PersistTokens.Key := 'test_key.ini'; 204 | 205 | MyCloudData.ClientId := MCDClientId; 206 | MyCloudData.ClientSecret := MCDClientSecret; 207 | MyCloudData.OnConnectedStatusChanged := ConnectedStatusChanged; 208 | 209 | MyCloudData.LoadToken; 210 | if (MyCloudData.IsTokenAvailable) then 211 | begin 212 | MyCloudData.Connect; 213 | end; 214 | 215 | ToggleComponents; 216 | end; 217 | 218 | function TContactsDemoForm.GetApplicationInitialized: Boolean; 219 | begin 220 | Result := IsConnected AND Assigned(ContactsTable); 221 | end; 222 | 223 | procedure TContactsDemoForm.GetUserDetails; 224 | begin 225 | if IsConnected AND (MyCloudData.CurrentUser <> nil) then 226 | begin 227 | ConnectedAsValueLabel.Text := MyCloudData.CurrentUser.Email; 228 | AccountTypeValueLabel.Text := MyCloudData.CurrentUser.UserTypeAsString; 229 | end 230 | else 231 | begin 232 | ConnectedAsValueLabel.Text := ''; 233 | AccountTypeValueLabel.Text := ''; 234 | end; 235 | end; 236 | 237 | procedure TContactsDemoForm.GenderFilterRadioOnChange(Sender: TObject); 238 | var 239 | LNewGenderFilter: integer; 240 | begin 241 | LNewGenderFilter := 0; 242 | if GenderFilterMaleRadioButton.IsChecked then 243 | begin 244 | LNewGenderFilter := 1; 245 | end; 246 | if GenderFilterFemaleRadioButton.IsChecked then 247 | begin 248 | LNewGenderFilter := 2; 249 | end; 250 | 251 | if (LNewGenderFilter <> FGenderFilter) then 252 | begin 253 | FGenderFilter := LNewGenderFilter; 254 | LoadContacts; 255 | end; 256 | 257 | end; 258 | 259 | procedure TContactsDemoForm.InitializeComponents; 260 | begin 261 | GenderFilterAllRadioButton.IsChecked := true; 262 | ContactsListBox.items.Clear; 263 | ContactsListBox.ItemIndex := -1; 264 | ClearContactDetails; 265 | GetUserDetails; 266 | end; 267 | 268 | procedure TContactsDemoForm.InitializeContactsTable; 269 | begin 270 | try 271 | // Get OR Create the table 272 | ContactsTable := MyCloudData.Tables.GetOrCreateTable('TMSRestClientDemo_Contacts'); 273 | 274 | // Ensure that all necessary fields are present on the table 275 | ContactsTable.Fields.AddOrUpdate('Name', ftWideString, 50); 276 | ContactsTable.Fields.AddOrUpdate('EmailAddress', ftWideString); 277 | 278 | ContactsTable.Fields.AddOrUpdate('GenderCode', ftInteger); 279 | 280 | ContactsTable.Fields.AddOrUpdate('DateOfBirth', ftDateTime); 281 | ContactsTable.Fields.AddOrUpdate('RelationShip', ftWideString, 1); 282 | 283 | if BlobFieldsAreEnabled then 284 | begin 285 | ContactsTable.Fields.AddOrUpdate('Picture', ftBlob); 286 | end; 287 | 288 | // Save the fields 289 | ContactsTable.Fields.Save; 290 | 291 | except 292 | on E: Exception do 293 | begin 294 | if ContactsTable <> nil then 295 | begin 296 | ContactsTable := nil; 297 | end; 298 | ShowErrorMessage('Failed to initialize contacts table', E); 299 | end; 300 | end; 301 | end; 302 | 303 | procedure TContactsDemoForm.InsertPictureButtonClick(Sender: TObject); 304 | var 305 | LPictureBlobField: TmyCloudDataBlob; 306 | begin 307 | if SelectedContact <> nil then 308 | begin 309 | if PictureOpenDialog.Execute then 310 | begin 311 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 312 | try 313 | LPictureBlobField.FromFile(PictureOpenDialog.FileName); 314 | except 315 | on E: Exception do 316 | ShowMessage('Upload failed, please try again'); 317 | end; 318 | LoadContactImage; 319 | end; 320 | end; 321 | end; 322 | 323 | procedure TContactsDemoForm.LoadContactDetails; 324 | begin 325 | NameTextBox.Text := SelectedContact.GetValue('Name'); 326 | EmailTextBox.Text := SelectedContact.GetValue('EmailAddress'); 327 | BirthDatePicker.Date := SelectedContact.GetValue('DateOfBirth'); 328 | GenderSelectMaleRadioButton.IsChecked := SelectedContact.GetValue('GenderCode') = 1; 329 | GenderSelectFemaleRadioButton.IsChecked := SelectedContact.GetValue('GenderCode') = 2; 330 | IsFriendCheckbox.IsChecked := SelectedContact.GetValue('RelationShip') = 'F'; 331 | LoadContactImage; 332 | end; 333 | 334 | procedure TContactsDemoForm.LoadContactImage; 335 | var 336 | LPictureBlobField: TmyCloudDataBlob; 337 | LBitmap: TBitmap; 338 | begin 339 | ContactImage.Bitmap := nil; 340 | InsertPictureButton.Enabled := false; 341 | RemovePictureButton.Enabled := false; 342 | if SelectedContact <> nil then 343 | begin 344 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 345 | if (LPictureBlobField <> nil) then 346 | begin 347 | InsertPictureButton.Enabled := true; 348 | if (LPictureBlobField.HasData) then 349 | begin 350 | if (LPictureBlobField.TryGetAsBitmap(LBitmap)) then 351 | begin 352 | ContactImage.Bitmap := LBitmap; 353 | LBitmap.Free; 354 | end; 355 | RemovePictureButton.Enabled := true; 356 | end; 357 | end; 358 | end; 359 | end; 360 | 361 | procedure TContactsDemoForm.LoadContacts; 362 | begin 363 | if ContactsTable <> nil then 364 | begin 365 | ContactsTable.Filters.Clear; 366 | if GenderFilterMaleRadioButton.IsChecked then 367 | begin 368 | ContactsTable.Filters.Add('GenderCode', 1, coEqual, loNone); 369 | end; 370 | if GenderFilterFemaleRadioButton.IsChecked then 371 | begin 372 | ContactsTable.Filters.Add('GenderCode', 2, coEqual, loNone); 373 | end; 374 | ContactsTable.Query; 375 | UpdateContactsList; 376 | end; 377 | end; 378 | 379 | procedure TContactsDemoForm.ConnectedStatusChanged(ASender: TObject; const AConnected: Boolean); 380 | begin 381 | try 382 | 383 | IsConnected := AConnected; 384 | InitializeComponents; 385 | 386 | if AConnected then 387 | begin 388 | InitializeContactsTable; 389 | if ApplicationInitialized then 390 | begin 391 | LoadContacts; 392 | end; 393 | end 394 | else 395 | begin 396 | FSelectedContact := nil; 397 | end; 398 | 399 | ToggleComponents; 400 | except 401 | on E: Exception do 402 | ShowErrorMessage('Something went wrong', E); 403 | end; 404 | end; 405 | 406 | procedure TContactsDemoForm.RemovePictureButtonClick(Sender: TObject); 407 | var 408 | LPictureBlobField: TmyCloudDataBlob; 409 | begin 410 | if SelectedContact <> nil then 411 | begin 412 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 413 | try 414 | LPictureBlobField.Stream := nil; 415 | except 416 | on E: Exception do 417 | ShowErrorMessage('Delete failed, please try again', E); 418 | end; 419 | LoadContactImage; 420 | end; 421 | end; 422 | 423 | procedure TContactsDemoForm.SetSelectedContact(AContactEntity: TmyCloudDataEntity); 424 | begin 425 | if not(AContactEntity = nil) then 426 | begin 427 | if not(AContactEntity = FSelectedContact) then 428 | begin 429 | FSelectedContact := AContactEntity; 430 | LoadContactDetails; 431 | ToggleComponents; 432 | end; 433 | end 434 | else 435 | begin 436 | FSelectedContact := nil; 437 | ClearContactDetails; 438 | end; 439 | end; 440 | 441 | procedure TContactsDemoForm.ShowErrorMessage(AMessage: string; AError: Exception); 442 | begin 443 | ShowMessage(AMessage + sLineBreak + sLineBreak + 'Details: ' + sLineBreak + AError.Message); 444 | end; 445 | 446 | procedure TContactsDemoForm.ToggleComponents; 447 | begin 448 | ConnectButton.Enabled := not IsConnected; 449 | DisconnectButton.Enabled := IsConnected; 450 | GenderFilterRadioGroup.Enabled := ApplicationInitialized; 451 | ContactsListBox.Enabled := ApplicationInitialized; 452 | NameTextBox.Enabled := ApplicationInitialized; 453 | EmailTextBox.Enabled := ApplicationInitialized; 454 | GenderSelectRadioGroup.Enabled := ApplicationInitialized; 455 | BirthDatePicker.Enabled := ApplicationInitialized; 456 | IsFriendCheckbox.Enabled := ApplicationInitialized; 457 | AddContactButton.Enabled := ApplicationInitialized; 458 | UpdateContactButton.Enabled := ApplicationInitialized AND (SelectedContact <> nil); 459 | DeleteContactButton.Enabled := ApplicationInitialized AND (SelectedContact <> nil); 460 | 461 | BlobsNotEnabledWarning.Visible := IsConnected AND (not BlobFieldsAreEnabled); 462 | InsertPictureButton.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 463 | RemovePictureButton.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 464 | ContactImage.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 465 | end; 466 | 467 | procedure TContactsDemoForm.UpdateContactButtonClick(Sender: TObject); 468 | var 469 | LContact: TmyCloudDataEntity; 470 | begin 471 | LContact := ContactsTable.Entities.GetEntity(SelectedContact.ID); 472 | if LContact <> nil then 473 | begin 474 | UpdateContactFromUI(LContact); 475 | ContactsTable.Entities.Save; 476 | UpdateContactsList; 477 | end; 478 | end; 479 | 480 | procedure TContactsDemoForm.UpdateContactFromUI(AContact: TmyCloudDataEntity); 481 | begin 482 | AContact.SetValue('Name', NameTextBox.Text); 483 | AContact.SetValue('EmailAddress', EmailTextBox.Text); 484 | AContact.SetValue('DateOfBirth', BirthDatePicker.DateTime); 485 | if IsFriendCheckbox.IsChecked then 486 | begin 487 | AContact.SetValue('RelationShip', 'F'); 488 | end 489 | else 490 | begin 491 | AContact.SetValue('RelationShip', ''); 492 | end; 493 | 494 | if GenderSelectMaleRadioButton.IsChecked then 495 | AContact.SetValue('GenderCode', 1); 496 | if GenderSelectFemaleRadioButton.IsChecked then 497 | AContact.SetValue('GenderCode', 2); 498 | 499 | end; 500 | 501 | procedure TContactsDemoForm.UpdateContactsList; 502 | var 503 | LContact: TmyCloudDataEntity; 504 | LIndexCounter: integer; 505 | LSelectedContactFound: Boolean; 506 | begin 507 | if ContactsTable <> nil then 508 | begin 509 | Contacts := ContactsTable.Entities; 510 | ContactsListBox.Clear; 511 | LIndexCounter := 0; 512 | LSelectedContactFound := false; 513 | for LContact in Contacts do 514 | begin 515 | ContactsListBox.items.AddObject(LContact.GetValue('Name'), LContact); 516 | if (SelectedContact <> nil) AND (LContact.ID = SelectedContact.ID) then 517 | begin 518 | ContactsListBox.ItemIndex := LIndexCounter; 519 | LSelectedContactFound := true; 520 | end; 521 | LIndexCounter := LIndexCounter + 1; 522 | end; 523 | if (not LSelectedContactFound) then 524 | begin 525 | if (ContactsListBox.items.Count > 0) then 526 | begin 527 | ContactsListBox.ItemIndex := 0; 528 | end 529 | else 530 | begin 531 | ContactsListBox.ItemIndex := -1; 532 | SelectedContact := nil; 533 | end; 534 | end; 535 | end; 536 | end; 537 | 538 | end. 539 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/FmxContactsDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/Demos/FMX/ContactsDemo/FmxContactsDemo.res -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/REST.Authenticator.OAuth.WebForm.FMX.fmx: -------------------------------------------------------------------------------- 1 | object frm_OAuthWebForm: Tfrm_OAuthWebForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form23' 5 | ClientHeight = 567 6 | ClientWidth = 384 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [dkDesktop] 10 | OnCreate = FormCreate 11 | OnClose = FormClose 12 | DesignerMobile = True 13 | DesignerWidth = 384 14 | DesignerHeight = 592 15 | DesignerDeviceName = 'Google Nexus 4' 16 | DesignerOrientation = 0 17 | DesignerOSVersion = '' 18 | object Layout1: TLayout 19 | Align = alTop 20 | Height = 41.000000000000000000 21 | Width = 384.000000000000000000 22 | end 23 | object Layout2: TLayout 24 | Align = alBottom 25 | Height = 50.000000000000000000 26 | Position.Y = 517.000000000000000000 27 | Width = 384.000000000000000000 28 | object btn_Close: TButton 29 | Anchors = [akRight, akBottom] 30 | Height = 44.000000000000000000 31 | Position.X = 256.000000000000000000 32 | TabOrder = 0 33 | Text = '&Close' 34 | Trimming = ttCharacter 35 | Width = 121.000000000000000000 36 | OnClick = btn_CloseClick 37 | end 38 | end 39 | object Layout3: TLayout 40 | Align = alClient 41 | Height = 476.000000000000000000 42 | Width = 384.000000000000000000 43 | object WebBrowser: TWebBrowser 44 | Align = alClient 45 | Height = 476.000000000000000000 46 | Width = 384.000000000000000000 47 | OnDidFinishLoad = WebBrowserDidFinishLoad 48 | OnShouldStartLoadWithRequest = WebBrowserShouldStartLoadWithRequest 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demos/FMX/ContactsDemo/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/APPIDS.INC: -------------------------------------------------------------------------------- 1 | //please specify the keys here 2 | 3 | const 4 | MCDClientId = ''; 5 | MCDClientSecret = ''; 6 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/Demos.VCL.Contacts.Project.dpr: -------------------------------------------------------------------------------- 1 | program Demos.VCL.Contacts.Project; 2 | 3 | uses 4 | Vcl.Forms, 5 | Demos.VCL.Contacts in 'Demos.VCL.Contacts.pas' {ContactsDemoForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TContactsDemoForm, ContactsDemoForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/Demos.VCL.Contacts.Project.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {A894FAEB-B6CE-4B0B-8D0B-ACBDEADBA417} 4 | 18.2 5 | VCL 6 | Demos.VCL.Contacts.Project.dpr 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | true 44 | Cfg_2 45 | true 46 | true 47 | 48 | 49 | Demos_VCL_Contacts_Project 50 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) 51 | $(BDS)\bin\delphi_PROJECTICON.ico 52 | .\$(Platform)\$(Config) 53 | .\$(Platform)\$(Config) 54 | false 55 | false 56 | false 57 | false 58 | false 59 | 60 | 61 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 62 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 63 | true 64 | $(BDS)\bin\default_app.manifest 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 66 | 1033 67 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName) 68 | DBXSqliteDriver;RESTComponents;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyCore;tmsexdXE10;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;TMSCloudPkgDEDXE10;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;VCLTMSMyCloudDataRestClient;DataSnapClient;inet;bindcompdbx;IndyIPCommon;vcl;DBXSybaseASEDriver;IndyIPServer;IndySystem;FireDACDb2Driver;tmsxlsdXE10;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;TMSCloudPkgDXE10;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;tmswizdXE10;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;tmsdXE10;fmxase;$(DCC_UsePackage) 69 | 70 | 71 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 72 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 73 | DBXSqliteDriver;RESTComponents;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyCore;tmsexdXE10;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;vcl;DBXSybaseASEDriver;IndyIPServer;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;tmsdXE10;fmxase;$(DCC_UsePackage) 74 | 75 | 76 | DEBUG;$(DCC_Define) 77 | true 78 | false 79 | true 80 | true 81 | true 82 | 83 | 84 | Debug 85 | true 86 | true 87 | false 88 | 89 | 90 | false 91 | RELEASE;$(DCC_Define) 92 | 0 93 | 0 94 | 95 | 96 | true 97 | true 98 | 99 | 100 | 101 | MainSource 102 | 103 | 104 |
ContactsDemoForm
105 | dfm 106 |
107 | 108 | Cfg_2 109 | Base 110 | 111 | 112 | Base 113 | 114 | 115 | Cfg_1 116 | Base 117 | 118 |
119 | 120 | Delphi.Personality.12 121 | Application 122 | 123 | 124 | 125 | Demos.VCL.Contacts.Project.dpr 126 | 127 | 128 | 129 | 130 | 131 | Demos_VCL_Contacts_Project.exe 132 | true 133 | 134 | 135 | 136 | 137 | 0 138 | .dll;.bpl 139 | 140 | 141 | 1 142 | .dylib 143 | 144 | 145 | Contents\MacOS 146 | 1 147 | .dylib 148 | 149 | 150 | 1 151 | .dylib 152 | 153 | 154 | 1 155 | .dylib 156 | 157 | 158 | 159 | 160 | Contents\Resources 161 | 1 162 | 163 | 164 | 165 | 166 | classes 167 | 1 168 | 169 | 170 | 171 | 172 | Contents\MacOS 173 | 0 174 | 175 | 176 | 1 177 | 178 | 179 | Contents\MacOS 180 | 1 181 | 182 | 183 | 184 | 185 | 1 186 | 187 | 188 | 1 189 | 190 | 191 | 1 192 | 193 | 194 | 195 | 196 | res\drawable-xxhdpi 197 | 1 198 | 199 | 200 | 201 | 202 | library\lib\mips 203 | 1 204 | 205 | 206 | 207 | 208 | 1 209 | 210 | 211 | 1 212 | 213 | 214 | 0 215 | 216 | 217 | 1 218 | 219 | 220 | Contents\MacOS 221 | 1 222 | 223 | 224 | library\lib\armeabi-v7a 225 | 1 226 | 227 | 228 | 1 229 | 230 | 231 | 232 | 233 | 0 234 | 235 | 236 | Contents\MacOS 237 | 1 238 | .framework 239 | 240 | 241 | 242 | 243 | 1 244 | 245 | 246 | 1 247 | 248 | 249 | 250 | 251 | 1 252 | 253 | 254 | 1 255 | 256 | 257 | 1 258 | 259 | 260 | 261 | 262 | 1 263 | 264 | 265 | 1 266 | 267 | 268 | 1 269 | 270 | 271 | 272 | 273 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 274 | 1 275 | 276 | 277 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 278 | 1 279 | 280 | 281 | 282 | 283 | 1 284 | 285 | 286 | 1 287 | 288 | 289 | 1 290 | 291 | 292 | 293 | 294 | 1 295 | 296 | 297 | 1 298 | 299 | 300 | 1 301 | 302 | 303 | 304 | 305 | library\lib\armeabi 306 | 1 307 | 308 | 309 | 310 | 311 | 0 312 | 313 | 314 | 1 315 | 316 | 317 | Contents\MacOS 318 | 1 319 | 320 | 321 | 322 | 323 | 1 324 | 325 | 326 | 1 327 | 328 | 329 | 1 330 | 331 | 332 | 333 | 334 | res\drawable-normal 335 | 1 336 | 337 | 338 | 339 | 340 | res\drawable-xhdpi 341 | 1 342 | 343 | 344 | 345 | 346 | res\drawable-large 347 | 1 348 | 349 | 350 | 351 | 352 | 1 353 | 354 | 355 | 1 356 | 357 | 358 | 1 359 | 360 | 361 | 362 | 363 | Assets 364 | 1 365 | 366 | 367 | Assets 368 | 1 369 | 370 | 371 | 372 | 373 | ..\ 374 | 1 375 | 376 | 377 | ..\ 378 | 1 379 | 380 | 381 | 382 | 383 | res\drawable-hdpi 384 | 1 385 | 386 | 387 | 388 | 389 | library\lib\armeabi-v7a 390 | 1 391 | 392 | 393 | 394 | 395 | Contents 396 | 1 397 | 398 | 399 | 400 | 401 | ..\ 402 | 1 403 | 404 | 405 | 406 | 407 | Assets 408 | 1 409 | 410 | 411 | Assets 412 | 1 413 | 414 | 415 | 416 | 417 | 1 418 | 419 | 420 | 1 421 | 422 | 423 | 1 424 | 425 | 426 | 427 | 428 | res\values 429 | 1 430 | 431 | 432 | 433 | 434 | res\drawable-small 435 | 1 436 | 437 | 438 | 439 | 440 | res\drawable 441 | 1 442 | 443 | 444 | 445 | 446 | 1 447 | 448 | 449 | 1 450 | 451 | 452 | 1 453 | 454 | 455 | 456 | 457 | 1 458 | 459 | 460 | 461 | 462 | res\drawable 463 | 1 464 | 465 | 466 | 467 | 468 | 0 469 | 470 | 471 | 0 472 | 473 | 474 | Contents\Resources\StartUp\ 475 | 0 476 | 477 | 478 | 0 479 | 480 | 481 | 0 482 | 483 | 484 | 0 485 | 486 | 487 | 488 | 489 | library\lib\armeabi-v7a 490 | 1 491 | 492 | 493 | 494 | 495 | 0 496 | .bpl 497 | 498 | 499 | 1 500 | .dylib 501 | 502 | 503 | Contents\MacOS 504 | 1 505 | .dylib 506 | 507 | 508 | 1 509 | .dylib 510 | 511 | 512 | 1 513 | .dylib 514 | 515 | 516 | 517 | 518 | res\drawable-mdpi 519 | 1 520 | 521 | 522 | 523 | 524 | res\drawable-xlarge 525 | 1 526 | 527 | 528 | 529 | 530 | res\drawable-ldpi 531 | 1 532 | 533 | 534 | 535 | 536 | 1 537 | 538 | 539 | 1 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | True 553 | False 554 | 555 | False 556 | 557 | 12 558 | 559 | 560 | 561 | 562 |
563 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/Demos.VCL.Contacts.Project.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/Demos/VCL/ContactsDemo/Demos.VCL.Contacts.Project.res -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/Demos.VCL.Contacts.dfm: -------------------------------------------------------------------------------- 1 | object ContactsDemoForm: TContactsDemoForm 2 | Left = 0 3 | Top = 12 4 | Caption = 'MyCloudData - VCL Contacts DEMO application' 5 | ClientHeight = 472 6 | ClientWidth = 922 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Position = poDesigned 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object ConnectedAsLabel: TLabel 19 | Left = 241 20 | Top = 12 21 | Width = 59 22 | Height = 11 23 | Caption = 'Connected as:' 24 | Font.Charset = DEFAULT_CHARSET 25 | Font.Color = clWindowText 26 | Font.Height = -9 27 | Font.Name = 'Tahoma' 28 | Font.Style = [] 29 | ParentFont = False 30 | end 31 | object ConnectedAsValueLabel: TLabel 32 | Left = 308 33 | Top = 12 34 | Width = 69 35 | Height = 11 36 | Caption = 'not connected' 37 | Font.Charset = DEFAULT_CHARSET 38 | Font.Color = clWindowText 39 | Font.Height = -9 40 | Font.Name = 'Tahoma' 41 | Font.Style = [fsBold] 42 | ParentFont = False 43 | end 44 | object AccountTypeLabel: TLabel 45 | Left = 241 46 | Top = 25 47 | Width = 58 48 | Height = 11 49 | Caption = 'Account type:' 50 | Font.Charset = DEFAULT_CHARSET 51 | Font.Color = clWindowText 52 | Font.Height = -9 53 | Font.Name = 'Tahoma' 54 | Font.Style = [] 55 | ParentFont = False 56 | end 57 | object AccountTypeValueLabel: TLabel 58 | Left = 308 59 | Top = 25 60 | Width = 69 61 | Height = 11 62 | Caption = 'not connected' 63 | Font.Charset = DEFAULT_CHARSET 64 | Font.Color = clWindowText 65 | Font.Height = -9 66 | Font.Name = 'Tahoma' 67 | Font.Style = [fsBold] 68 | ParentFont = False 69 | end 70 | object DetailsGroupBox: TGroupBox 71 | Left = 280 72 | Top = 56 73 | Width = 329 74 | Height = 393 75 | Caption = 'Contact Details' 76 | TabOrder = 4 77 | object BirthDateLabel: TLabel 78 | Left = 16 79 | Top = 200 80 | Width = 61 81 | Height = 13 82 | Caption = 'Date of birth' 83 | end 84 | object RelationshipLabel: TLabel 85 | Left = 16 86 | Top = 264 87 | Width = 58 88 | Height = 13 89 | Caption = 'Relationship' 90 | end 91 | object EmailTextBox: TLabeledEdit 92 | Left = 16 93 | Top = 96 94 | Width = 297 95 | Height = 21 96 | EditLabel.Width = 24 97 | EditLabel.Height = 13 98 | EditLabel.Caption = 'Email' 99 | TabOrder = 1 100 | end 101 | object AddContactButton: TButton 102 | Left = 17 103 | Top = 336 104 | Width = 94 105 | Height = 33 106 | Caption = 'Add' 107 | TabOrder = 5 108 | OnClick = AddContactButtonClick 109 | end 110 | object BirthDatePicker: TDateTimePicker 111 | Left = 16 112 | Top = 219 113 | Width = 297 114 | Height = 21 115 | Date = 42709.405151655090000000 116 | Time = 42709.405151655090000000 117 | TabOrder = 3 118 | end 119 | object DeleteContactButton: TButton 120 | Left = 220 121 | Top = 336 122 | Width = 96 123 | Height = 33 124 | Caption = 'Delete' 125 | TabOrder = 7 126 | OnClick = DeleteContactButtonClick 127 | end 128 | object GenderSelectRadioGroup: TRadioGroup 129 | Left = 16 130 | Top = 131 131 | Width = 297 132 | Height = 55 133 | Caption = 'Gender' 134 | Columns = 2 135 | ItemIndex = 0 136 | Items.Strings = ( 137 | 'Male' 138 | 'Female') 139 | TabOrder = 2 140 | TabStop = True 141 | end 142 | object IsFriendCheckbox: TCheckBox 143 | Left = 16 144 | Top = 283 145 | Width = 97 146 | Height = 17 147 | Caption = 'Friend' 148 | TabOrder = 4 149 | end 150 | object NameTextBox: TLabeledEdit 151 | Left = 16 152 | Top = 44 153 | Width = 297 154 | Height = 21 155 | EditLabel.Width = 27 156 | EditLabel.Height = 13 157 | EditLabel.Caption = 'Name' 158 | TabOrder = 0 159 | end 160 | object UpdateContactButton: TButton 161 | Left = 118 162 | Top = 336 163 | Width = 95 164 | Height = 33 165 | Caption = 'Update' 166 | TabOrder = 6 167 | OnClick = UpdateContactButtonClick 168 | end 169 | end 170 | object ConnectButton: TButton 171 | Left = 8 172 | Top = 8 173 | Width = 105 174 | Height = 33 175 | Caption = 'Connect' 176 | TabOrder = 0 177 | OnClick = ConnectButtonClick 178 | end 179 | object DisconnectButton: TButton 180 | Left = 119 181 | Top = 8 182 | Width = 105 183 | Height = 33 184 | Caption = 'Disconnect' 185 | TabOrder = 1 186 | OnClick = DisconnectButtonClick 187 | end 188 | object GenderFilterRadioGroup: TRadioGroup 189 | Left = 8 190 | Top = 56 191 | Width = 249 192 | Height = 65 193 | Caption = 'Filter by gender' 194 | Columns = 3 195 | ItemIndex = 2 196 | Items.Strings = ( 197 | 'Male' 198 | 'Female' 199 | 'All') 200 | TabOrder = 2 201 | TabStop = True 202 | OnClick = GenderFilterRadioGroupClick 203 | end 204 | object ContactsListBox: TListBox 205 | Left = 8 206 | Top = 136 207 | Width = 249 208 | Height = 313 209 | ItemHeight = 13 210 | TabOrder = 3 211 | OnClick = ContactsListBoxClick 212 | end 213 | object PictureGroupBox: TGroupBox 214 | Left = 623 215 | Top = 56 216 | Width = 281 217 | Height = 393 218 | Caption = 'Contact Image' 219 | TabOrder = 5 220 | object InsertPictureButton: TSpeedButton 221 | Left = 18 222 | Top = 336 223 | Width = 111 224 | Height = 33 225 | Caption = 'Insert Picture' 226 | OnClick = InsertPictureButtonClick 227 | end 228 | object RemovePictureButton: TSpeedButton 229 | Left = 135 230 | Top = 336 231 | Width = 98 232 | Height = 33 233 | Caption = 'Remove picture' 234 | OnClick = RemovePictureButtonClick 235 | end 236 | object ContactImage: TImage 237 | Left = 16 238 | Top = 43 239 | Width = 249 240 | Height = 257 241 | Proportional = True 242 | Stretch = True 243 | end 244 | object BlobsNotEnabledWarning: TLabel 245 | Left = 16 246 | Top = 25 247 | Width = 203 248 | Height = 12 249 | Caption = 'Blob fields are not available for free accounts.' 250 | Color = clRed 251 | Font.Charset = DEFAULT_CHARSET 252 | Font.Color = cl3DDkShadow 253 | Font.Height = -10 254 | Font.Name = 'Tahoma' 255 | Font.Style = [fsItalic] 256 | ParentColor = False 257 | ParentFont = False 258 | end 259 | end 260 | object PictureOpenDialog: TOpenDialog 261 | Filter = 'Images|*.jpeg;*.jpg;*.png;*.gif;*.bmp' 262 | Left = 680 263 | Top = 120 264 | end 265 | end 266 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/Demos.VCL.Contacts.pas: -------------------------------------------------------------------------------- 1 | unit Demos.VCL.Contacts; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, VCL.Graphics, 7 | VCL.Controls, VCL.Forms, VCL.Dialogs, IPPeerClient, Data.Bind.Components, 8 | Data.Bind.ObjectScope, REST.Client, REST.TMS.myCloudDataRestClient.Data, 9 | REST.TMS.myCloudDataRestClient, VCL.TMS.myCloudDataRestClient, VCL.StdCtrls, 10 | VCL.ExtCtrls, VCL.ComCtrls, VCL.Buttons; 11 | 12 | type 13 | 14 | TContactsDemoForm = class(TForm) 15 | ConnectButton: TButton; 16 | DisconnectButton: TButton; 17 | GenderFilterRadioGroup: TRadioGroup; 18 | ContactsListBox: TListBox; 19 | ContactImage: TImage; 20 | AddContactButton: TButton; 21 | UpdateContactButton: TButton; 22 | DeleteContactButton: TButton; 23 | NameTextBox: TLabeledEdit; 24 | EmailTextBox: TLabeledEdit; 25 | BirthDatePicker: TDateTimePicker; 26 | GenderSelectRadioGroup: TRadioGroup; 27 | BirthDateLabel: TLabel; 28 | RelationshipLabel: TLabel; 29 | IsFriendCheckbox: TCheckBox; 30 | InsertPictureButton: TSpeedButton; 31 | RemovePictureButton: TSpeedButton; 32 | PictureOpenDialog: TOpenDialog; 33 | DetailsGroupBox: TGroupBox; 34 | PictureGroupBox: TGroupBox; 35 | ConnectedAsLabel: TLabel; 36 | ConnectedAsValueLabel: TLabel; 37 | AccountTypeLabel: TLabel; 38 | AccountTypeValueLabel: TLabel; 39 | BlobsNotEnabledWarning: TLabel; 40 | 41 | procedure FormCreate(Sender: TObject); 42 | procedure ConnectButtonClick(Sender: TObject); 43 | procedure DisconnectButtonClick(Sender: TObject); 44 | procedure ConnectedStatusChanged(ASender: TObject; const AConnected: Boolean); 45 | procedure ContactsListBoxClick(Sender: TObject); 46 | procedure AddContactButtonClick(Sender: TObject); 47 | procedure UpdateContactButtonClick(Sender: TObject); 48 | procedure DeleteContactButtonClick(Sender: TObject); 49 | procedure InsertPictureButtonClick(Sender: TObject); 50 | procedure RemovePictureButtonClick(Sender: TObject); 51 | procedure GenderFilterRadioGroupClick(Sender: TObject); 52 | private 53 | FIsConnected: Boolean; 54 | FSelectedContact: TmyCloudDataEntity; 55 | FContacstTable: TmyCloudDataTable; 56 | FContacts: TmyCloudDataEntities; 57 | MyCloudData: TVCLmyCloudDataRESTClient; 58 | 59 | procedure SetSelectedContact(AContactEntity: TmyCloudDataEntity); 60 | function GetApplicationInitialized: Boolean; 61 | property IsConnected: Boolean read FIsConnected write FIsConnected; 62 | property ApplicationInitialized: Boolean read GetApplicationInitialized; 63 | property ContactsTable: TmyCloudDataTable read FContacstTable write FContacstTable; 64 | property Contacts: TmyCloudDataEntities read FContacts write FContacts; 65 | property SelectedContact: TmyCloudDataEntity read FSelectedContact write SetSelectedContact; 66 | function BlobFieldsAreEnabled: Boolean; 67 | procedure InitializeComponents; 68 | procedure ToggleComponents; 69 | procedure InitializeContactsTable; 70 | procedure GetUserDetails; 71 | procedure LoadContacts; 72 | procedure UpdateContactsList; 73 | procedure ClearContactDetails; 74 | procedure LoadContactDetails; 75 | procedure LoadContactImage; 76 | procedure UpdateContactFromUI(AContact: TmyCloudDataEntity); 77 | procedure ShowErrorMessage(AMessage: string; AError: Exception); 78 | public 79 | destructor Destroy; override; 80 | end; 81 | 82 | var 83 | ContactsDemoForm: TContactsDemoForm; 84 | 85 | implementation 86 | 87 | {$R *.dfm} 88 | // TO RUN THIS DEMO APPLICATION, PLEASE USE A VALID INCLUDE FILE THAT CONTAINS 89 | // THE APPLICATION KEY & SECRET FOR THE MyCloudData APPLICATION YOU WANT TO USE 90 | // STRUCTURE OF THIS .INC FILE SHOULD BE 91 | // 92 | // const 93 | // MCDClientId = 'xxxxxxxxx'; 94 | // MCDClientSecret = 'yyyyyyyy'; 95 | 96 | {$I APPIDS.INC} 97 | 98 | procedure TContactsDemoForm.AddContactButtonClick(Sender: TObject); 99 | var 100 | LContact: TmyCloudDataEntity; 101 | begin 102 | LContact := ContactsTable.Entities.CreateEntity; 103 | UpdateContactFromUI(LContact); 104 | ContactsTable.Entities.Save; 105 | SelectedContact := LContact; 106 | UpdateContactsList; 107 | end; 108 | 109 | function TContactsDemoForm.BlobFieldsAreEnabled: Boolean; 110 | begin 111 | Result := IsConnected AND MyCloudData.CurrentUser.CanUseBlobFields; 112 | end; 113 | 114 | procedure TContactsDemoForm.ClearContactDetails; 115 | begin 116 | NameTextBox.Text := ''; 117 | EmailTextBox.Text := ''; 118 | GenderSelectRadioGroup.ItemIndex := -1; 119 | BirthDatePicker.Date := Now; 120 | IsFriendCheckbox.Checked := false; 121 | ContactImage.Picture := nil; 122 | end; 123 | 124 | procedure TContactsDemoForm.ConnectButtonClick(Sender: TObject); 125 | begin 126 | MyCloudData.Connect; 127 | end; 128 | 129 | procedure TContactsDemoForm.ContactsListBoxClick(Sender: TObject); 130 | var 131 | LContact: TmyCloudDataEntity; 132 | begin 133 | if ContactsListBox.ItemIndex >= 0 then 134 | begin 135 | LContact := ContactsListBox.items.Objects[ContactsListBox.ItemIndex] as TmyCloudDataEntity; 136 | if not(LContact = nil) then 137 | begin 138 | SelectedContact := LContact; 139 | end 140 | else 141 | begin 142 | SelectedContact := nil; 143 | end; 144 | end; 145 | end; 146 | 147 | procedure TContactsDemoForm.DeleteContactButtonClick(Sender: TObject); 148 | begin 149 | if not(SelectedContact = nil) then 150 | begin 151 | ContactsTable.Entities.RemoveEntity(SelectedContact.ID); 152 | ContactsTable.Entities.Save; 153 | UpdateContactsList; 154 | end; 155 | end; 156 | 157 | destructor TContactsDemoForm.Destroy; 158 | begin 159 | if Assigned(MyCloudData) then 160 | begin 161 | MyCloudData.Free; 162 | end; 163 | inherited; 164 | end; 165 | 166 | procedure TContactsDemoForm.DisconnectButtonClick(Sender: TObject); 167 | begin 168 | MyCloudData.Disconnect; 169 | MyCloudData.ClearToken; 170 | end; 171 | 172 | procedure TContactsDemoForm.FormCreate(Sender: TObject); 173 | begin 174 | ReportMemoryLeaksOnShutdown := true; 175 | 176 | MyCloudData := TVCLmyCloudDataRESTClient.Create(self); 177 | 178 | MyCloudData.PersistTokens.Location := plRegistry; 179 | MyCloudData.PersistTokens.Section := 'test_section'; 180 | MyCloudData.PersistTokens.Key := 'test_key'; 181 | 182 | MyCloudData.ClientId := MCDClientId; 183 | MyCloudData.ClientSecret := MCDClientSecret; 184 | MyCloudData.OnConnectedStatusChanged := ConnectedStatusChanged; 185 | 186 | MyCloudData.LoadToken; 187 | if (MyCloudData.IsTokenAvailable) then 188 | begin 189 | MyCloudData.Connect; 190 | end; 191 | 192 | ToggleComponents; 193 | end; 194 | 195 | function TContactsDemoForm.GetApplicationInitialized: Boolean; 196 | begin 197 | Result := IsConnected AND Assigned(ContactsTable); 198 | end; 199 | 200 | procedure TContactsDemoForm.GetUserDetails; 201 | begin 202 | if IsConnected AND (MyCloudData.CurrentUser <> nil) then 203 | begin 204 | ConnectedAsValueLabel.Caption := MyCloudData.CurrentUser.Email; 205 | AccountTypeValueLabel.Caption := MyCloudData.CurrentUser.UserTypeAsString; 206 | end 207 | else 208 | begin 209 | ConnectedAsValueLabel.Caption := ''; 210 | AccountTypeValueLabel.Caption := ''; 211 | end; 212 | end; 213 | 214 | procedure TContactsDemoForm.GenderFilterRadioGroupClick(Sender: TObject); 215 | begin 216 | LoadContacts; 217 | end; 218 | 219 | procedure TContactsDemoForm.InitializeComponents; 220 | begin 221 | GenderFilterRadioGroup.ItemIndex := 2; 222 | ContactsListBox.Clear; 223 | ContactsListBox.ItemIndex := -1; 224 | ClearContactDetails; 225 | GetUserDetails; 226 | end; 227 | 228 | procedure TContactsDemoForm.InitializeContactsTable; 229 | begin 230 | try 231 | 232 | // Get OR Create the table 233 | ContactsTable := MyCloudData.Tables.GetOrCreateTable('TMSRestClientDemo_Contacts'); 234 | 235 | // Ensure that all necessary fields are present on the table 236 | ContactsTable.Fields.AddOrUpdate('Name', ftWideString, 50); 237 | ContactsTable.Fields.AddOrUpdate('EmailAddress', ftWideString); 238 | 239 | ContactsTable.Fields.AddOrUpdate('GenderCode', ftInteger); 240 | 241 | ContactsTable.Fields.AddOrUpdate('DateOfBirth', ftDateTime); 242 | ContactsTable.Fields.AddOrUpdate('RelationShip', ftWideString, 1); 243 | 244 | if BlobFieldsAreEnabled then 245 | begin 246 | ContactsTable.Fields.AddOrUpdate('Picture', ftBlob); 247 | end; 248 | 249 | // Save the fields 250 | ContactsTable.Fields.Save; 251 | 252 | except 253 | on E: Exception do 254 | begin 255 | if ContactsTable <> nil then 256 | begin 257 | ContactsTable := nil; 258 | end; 259 | ShowErrorMessage('Failed to initialize contacts table', E); 260 | end; 261 | end; 262 | end; 263 | 264 | procedure TContactsDemoForm.InsertPictureButtonClick(Sender: TObject); 265 | var 266 | LPictureBlobField: TmyCloudDataBlob; 267 | begin 268 | if SelectedContact <> nil then 269 | begin 270 | if PictureOpenDialog.Execute then 271 | begin 272 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 273 | try 274 | LPictureBlobField.FromFile(PictureOpenDialog.FileName); 275 | except 276 | on E: Exception do 277 | ShowMessage('Upload failed, please try again'); 278 | end; 279 | LoadContactImage; 280 | end; 281 | end; 282 | end; 283 | 284 | procedure TContactsDemoForm.LoadContactDetails; 285 | begin 286 | NameTextBox.Text := SelectedContact.GetValue('Name'); 287 | EmailTextBox.Text := SelectedContact.GetValue('EmailAddress'); 288 | BirthDatePicker.Date := SelectedContact.GetValue('DateOfBirth'); 289 | GenderSelectRadioGroup.ItemIndex := SelectedContact.GetValue('GenderCode') - 1; 290 | IsFriendCheckbox.Checked := SelectedContact.GetValue('RelationShip') = 'F'; 291 | LoadContactImage; 292 | end; 293 | 294 | procedure TContactsDemoForm.LoadContactImage; 295 | var 296 | LPictureBlobField: TmyCloudDataBlob; 297 | LGraphic: TGraphic; 298 | begin 299 | ContactImage.Picture := nil; 300 | InsertPictureButton.Enabled := false; 301 | RemovePictureButton.Enabled := false; 302 | if SelectedContact <> nil then 303 | begin 304 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 305 | if (LPictureBlobField <> nil) then 306 | begin 307 | InsertPictureButton.Enabled := true; 308 | if (LPictureBlobField.HasData) then 309 | begin 310 | if (LPictureBlobField.TryGetAsGraphic(LGraphic)) then 311 | begin 312 | ContactImage.Picture.Graphic := LGraphic; 313 | LGraphic.Free; 314 | end; 315 | RemovePictureButton.Enabled := true; 316 | end; 317 | end; 318 | end; 319 | end; 320 | 321 | procedure TContactsDemoForm.LoadContacts; 322 | begin 323 | if ContactsTable <> nil then 324 | begin 325 | ContactsTable.Filters.Clear; 326 | if (GenderFilterRadioGroup.ItemIndex in [0, 1]) then 327 | begin 328 | ContactsTable.Filters.Add('GenderCode', GenderFilterRadioGroup.ItemIndex + 1, coEqual, loNone); 329 | end; 330 | ContactsTable.Query; 331 | UpdateContactsList; 332 | end; 333 | end; 334 | 335 | procedure TContactsDemoForm.ConnectedStatusChanged(ASender: TObject; const AConnected: Boolean); 336 | begin 337 | try 338 | 339 | IsConnected := AConnected; 340 | InitializeComponents; 341 | 342 | if AConnected then 343 | begin 344 | InitializeContactsTable; 345 | if ApplicationInitialized then 346 | begin 347 | LoadContacts; 348 | end; 349 | end 350 | else 351 | begin 352 | FSelectedContact := nil; 353 | end; 354 | 355 | ToggleComponents; 356 | except 357 | on E: Exception do 358 | ShowErrorMessage('Something went wrong', E); 359 | end; 360 | end; 361 | 362 | procedure TContactsDemoForm.RemovePictureButtonClick(Sender: TObject); 363 | var 364 | LPictureBlobField: TmyCloudDataBlob; 365 | begin 366 | if SelectedContact <> nil then 367 | begin 368 | LPictureBlobField := SelectedContact.GetBlobField('Picture'); 369 | try 370 | LPictureBlobField.Stream := nil; 371 | except 372 | on E: Exception do 373 | ShowErrorMessage('Delete failed, please try again', E); 374 | end; 375 | LoadContactImage; 376 | end; 377 | end; 378 | 379 | procedure TContactsDemoForm.SetSelectedContact(AContactEntity: TmyCloudDataEntity); 380 | begin 381 | if not(AContactEntity = nil) then 382 | begin 383 | if not(AContactEntity = FSelectedContact) then 384 | begin 385 | FSelectedContact := AContactEntity; 386 | LoadContactDetails; 387 | ToggleComponents; 388 | end; 389 | end 390 | else 391 | begin 392 | FSelectedContact := nil; 393 | ClearContactDetails; 394 | end; 395 | end; 396 | 397 | procedure TContactsDemoForm.ShowErrorMessage(AMessage: string; AError: Exception); 398 | begin 399 | ShowMessage(AMessage + sLineBreak + sLineBreak + 'Details: ' + sLineBreak + AError.Message); 400 | end; 401 | 402 | procedure TContactsDemoForm.ToggleComponents; 403 | begin 404 | ConnectButton.Enabled := not IsConnected; 405 | DisconnectButton.Enabled := IsConnected; 406 | GenderFilterRadioGroup.Enabled := ApplicationInitialized; 407 | ContactsListBox.Enabled := ApplicationInitialized; 408 | NameTextBox.Enabled := ApplicationInitialized; 409 | EmailTextBox.Enabled := ApplicationInitialized; 410 | GenderSelectRadioGroup.Enabled := ApplicationInitialized; 411 | BirthDatePicker.Enabled := ApplicationInitialized; 412 | IsFriendCheckbox.Enabled := ApplicationInitialized; 413 | AddContactButton.Enabled := ApplicationInitialized; 414 | UpdateContactButton.Enabled := ApplicationInitialized AND (SelectedContact <> nil); 415 | DeleteContactButton.Enabled := ApplicationInitialized AND (SelectedContact <> nil); 416 | 417 | BlobsNotEnabledWarning.Visible := IsConnected AND (not BlobFieldsAreEnabled); 418 | InsertPictureButton.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 419 | RemovePictureButton.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 420 | ContactImage.Visible := ApplicationInitialized AND BlobFieldsAreEnabled AND (SelectedContact <> nil); 421 | end; 422 | 423 | procedure TContactsDemoForm.UpdateContactButtonClick(Sender: TObject); 424 | var 425 | LContact: TmyCloudDataEntity; 426 | begin 427 | LContact := ContactsTable.Entities.GetEntity(SelectedContact.ID); 428 | if LContact <> nil then 429 | begin 430 | UpdateContactFromUI(LContact); 431 | ContactsTable.Entities.Save; 432 | UpdateContactsList; 433 | end; 434 | end; 435 | 436 | procedure TContactsDemoForm.UpdateContactFromUI(AContact: TmyCloudDataEntity); 437 | begin 438 | AContact.SetValue('Name', NameTextBox.Text); 439 | AContact.SetValue('EmailAddress', EmailTextBox.Text); 440 | AContact.SetValue('DateOfBirth', BirthDatePicker.DateTime); 441 | if IsFriendCheckbox.Checked then 442 | begin 443 | AContact.SetValue('RelationShip', 'F'); 444 | end 445 | else 446 | begin 447 | AContact.SetValue('RelationShip', ''); 448 | end; 449 | 450 | case GenderSelectRadioGroup.ItemIndex of 451 | 0: 452 | AContact.SetValue('GenderCode', 1); 453 | 1: 454 | AContact.SetValue('GenderCode', 2); 455 | end; 456 | end; 457 | 458 | procedure TContactsDemoForm.UpdateContactsList; 459 | var 460 | LContact: TmyCloudDataEntity; 461 | LIndexCounter: integer; 462 | LSelectedContactFound: Boolean; 463 | begin 464 | if ContactsTable <> nil then 465 | begin 466 | Contacts := ContactsTable.Entities; 467 | ContactsListBox.Clear; 468 | LIndexCounter := 0; 469 | LSelectedContactFound := false; 470 | for LContact in Contacts do 471 | begin 472 | ContactsListBox.items.AddObject(LContact.GetValue('Name'), LContact); 473 | if (SelectedContact <> nil) AND (LContact.ID = SelectedContact.ID) then 474 | begin 475 | ContactsListBox.ItemIndex := LIndexCounter; 476 | LSelectedContactFound := true; 477 | end; 478 | LIndexCounter := LIndexCounter + 1; 479 | end; 480 | if (not LSelectedContactFound) then 481 | begin 482 | if (ContactsListBox.items.Count > 0) then 483 | begin 484 | ContactsListBox.ItemIndex := 0; 485 | end 486 | else 487 | begin 488 | ContactsListBox.ItemIndex := -1; 489 | SelectedContact := nil; 490 | end; 491 | end; 492 | ContactsListBoxClick(ContactsListBox); 493 | end; 494 | end; 495 | 496 | end. 497 | -------------------------------------------------------------------------------- /Demos/VCL/ContactsDemo/VclContactsDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/Demos/VCL/ContactsDemo/VclContactsDemo.res -------------------------------------------------------------------------------- /FMX.MyCloudDataRestClient.dpk: -------------------------------------------------------------------------------- 1 | package FMX.MyCloudDataRestClient; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$IMPLICITBUILD ON} 29 | 30 | requires 31 | rtl, 32 | dbrtl, 33 | CustomIPTransport, 34 | fmx, 35 | bindengine, 36 | bindcomp, 37 | RESTComponents, 38 | Rest.TMSMyCloudDataRestClient, 39 | IndyIPCommon, 40 | IndySystem, 41 | IndyProtocols, 42 | IndyCore, 43 | IndyIPClient; 44 | 45 | contains 46 | FMX.TMS.myCloudDataRestClient in 'FMX.TMS.myCloudDataRestClient.pas', 47 | FMX.TMS.myCloudDataRestClientReg in 'FMX.TMS.myCloudDataRestClientReg.pas'; 48 | 49 | end. 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /FMX.MyCloudDataRestClient.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {F639EFA3-B9AA-443E-81B5-AD25CEAAE026} 4 | FMX.MyCloudDataRestClient.dpk 5 | 18.1 6 | None 7 | True 8 | Debug 9 | Win32 10 | 17 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Base 34 | true 35 | 36 | 37 | true 38 | Base 39 | true 40 | 41 | 42 | true 43 | Base 44 | true 45 | 46 | 47 | true 48 | Cfg_1 49 | true 50 | true 51 | 52 | 53 | true 54 | Base 55 | true 56 | 57 | 58 | true 59 | true 60 | All 61 | FMX_MyCloudDataRestClient 62 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 63 | .\$(Platform)\$(Config) 64 | .\$(Platform)\$(Config) 65 | false 66 | false 67 | false 68 | false 69 | false 70 | 71 | 72 | package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= 73 | Debug 74 | None 75 | android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar 76 | 77 | 78 | None 79 | 80 | 81 | None 82 | 83 | 84 | None 85 | 86 | 87 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 88 | 1033 89 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 90 | true 91 | 92 | 93 | DEBUG;$(DCC_Define) 94 | true 95 | false 96 | true 97 | true 98 | true 99 | 100 | 101 | 1033 102 | true 103 | false 104 | 105 | 106 | false 107 | RELEASE;$(DCC_Define) 108 | 0 109 | 0 110 | 111 | 112 | 113 | MainSource 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | Cfg_2 142 | Base 143 | 144 | 145 | Base 146 | 147 | 148 | Cfg_1 149 | Base 150 | 151 | 152 | 153 | Delphi.Personality.12 154 | Package 155 | 156 | 157 | 158 | FMX.MyCloudDataRestClient.dpk 159 | 160 | 161 | 162 | 163 | 164 | true 165 | 166 | 167 | 168 | 169 | true 170 | 171 | 172 | 173 | 174 | true 175 | 176 | 177 | 178 | 179 | true 180 | 181 | 182 | 183 | 184 | FMX_MyCloudDataRestClient.bpl 185 | true 186 | 187 | 188 | 189 | 190 | 0 191 | .dll;.bpl 192 | 193 | 194 | 1 195 | .dylib 196 | 197 | 198 | 199 | 200 | Contents\Resources 201 | 1 202 | 203 | 204 | 205 | 206 | classes 207 | 1 208 | 209 | 210 | 211 | 212 | Contents\MacOS 213 | 0 214 | 215 | 216 | 1 217 | 218 | 219 | 220 | 221 | 1 222 | 223 | 224 | 1 225 | 226 | 227 | 1 228 | 229 | 230 | 231 | 232 | res\drawable-xxhdpi 233 | 1 234 | 235 | 236 | 237 | 238 | library\lib\mips 239 | 1 240 | 241 | 242 | 243 | 244 | 1 245 | 246 | 247 | 1 248 | 249 | 250 | 0 251 | 252 | 253 | 1 254 | 255 | 256 | 1 257 | 258 | 259 | library\lib\armeabi-v7a 260 | 1 261 | 262 | 263 | 1 264 | 265 | 266 | 267 | 268 | 0 269 | 270 | 271 | 1 272 | .framework 273 | 274 | 275 | 276 | 277 | 1 278 | 279 | 280 | 1 281 | 282 | 283 | 284 | 285 | 1 286 | 287 | 288 | 1 289 | 290 | 291 | 1 292 | 293 | 294 | 295 | 296 | 1 297 | 298 | 299 | 1 300 | 301 | 302 | 1 303 | 304 | 305 | 306 | 307 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 308 | 1 309 | 310 | 311 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 312 | 1 313 | 314 | 315 | 316 | 317 | 1 318 | 319 | 320 | 1 321 | 322 | 323 | 1 324 | 325 | 326 | 327 | 328 | 329 | library\lib\armeabi 330 | 1 331 | 332 | 333 | 334 | 335 | 0 336 | 337 | 338 | 1 339 | 340 | 341 | 1 342 | 343 | 344 | 345 | 346 | 1 347 | 348 | 349 | 1 350 | 351 | 352 | 1 353 | 354 | 355 | 356 | 357 | res\drawable-normal 358 | 1 359 | 360 | 361 | 362 | 363 | res\drawable-xhdpi 364 | 1 365 | 366 | 367 | 368 | 369 | res\drawable-large 370 | 1 371 | 372 | 373 | 374 | 375 | 1 376 | 377 | 378 | 1 379 | 380 | 381 | 1 382 | 383 | 384 | 385 | 386 | Assets 387 | 1 388 | 389 | 390 | Assets 391 | 1 392 | 393 | 394 | 395 | 396 | 397 | res\drawable-hdpi 398 | 1 399 | 400 | 401 | 402 | 403 | library\lib\armeabi-v7a 404 | 1 405 | 406 | 407 | 408 | 409 | 410 | 411 | Assets 412 | 1 413 | 414 | 415 | Assets 416 | 1 417 | 418 | 419 | 420 | 421 | 1 422 | 423 | 424 | 1 425 | 426 | 427 | 1 428 | 429 | 430 | 431 | 432 | res\values 433 | 1 434 | 435 | 436 | 437 | 438 | res\drawable-small 439 | 1 440 | 441 | 442 | 443 | 444 | res\drawable 445 | 1 446 | 447 | 448 | 449 | 450 | 1 451 | 452 | 453 | 1 454 | 455 | 456 | 1 457 | 458 | 459 | 460 | 461 | 1 462 | 463 | 464 | 465 | 466 | res\drawable 467 | 1 468 | 469 | 470 | 471 | 472 | 0 473 | 474 | 475 | 0 476 | 477 | 478 | 0 479 | 480 | 481 | 0 482 | 483 | 484 | 0 485 | 486 | 487 | 0 488 | 489 | 490 | 491 | 492 | library\lib\armeabi-v7a 493 | 1 494 | 495 | 496 | 497 | 498 | 0 499 | .bpl 500 | 501 | 502 | 1 503 | .dylib 504 | 505 | 506 | 1 507 | .dylib 508 | 509 | 510 | 1 511 | .dylib 512 | 513 | 514 | 1 515 | .dylib 516 | 517 | 518 | 519 | 520 | res\drawable-mdpi 521 | 1 522 | 523 | 524 | 525 | 526 | res\drawable-xlarge 527 | 1 528 | 529 | 530 | 531 | 532 | res\drawable-ldpi 533 | 1 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | True 548 | False 549 | False 550 | False 551 | False 552 | True 553 | False 554 | 555 | True 556 | 557 | 12 558 | 559 | 560 | 561 | 562 | 563 | -------------------------------------------------------------------------------- /FMX.MyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/FMX.MyCloudDataRestClient.res -------------------------------------------------------------------------------- /FMX.TMS.myCloudDataRestClient.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/FMX.TMS.myCloudDataRestClient.pas -------------------------------------------------------------------------------- /FMX.TMS.myCloudDataRestClientReg.dcr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/FMX.TMS.myCloudDataRestClientReg.dcr -------------------------------------------------------------------------------- /FMX.TMS.myCloudDataRestClientReg.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/FMX.TMS.myCloudDataRestClientReg.pas -------------------------------------------------------------------------------- /FMXTMSMyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/FMXTMSMyCloudDataRestClient.res -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /MyCloudDataRestClientPack.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/MyCloudDataRestClientPack.res -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TMS myCloudData REST client # 2 | 3 | FREE open-source client component for seamless access to the myCloudData.net service. 4 | 5 | ## About ## 6 | 7 | * Release v1.0.0.0 8 | * [Documentation](http://myclouddata.net/#/documentation/libraries/lib-delphi-os) 9 | * [More info on myCloudData.net](http://myclouddata.net) 10 | 11 | Use structured data storage in the cloud between your desktop & mobile applications. Always connect to your own live cloud data via myCloudData.net 12 | 13 | ### Seamless access to the myCloudData.net API ### 14 | 15 | Just drag the myCloudData REST Client component on your form and start using the [myCloudData Service](http://myclouddata.net) as it was a local database. 16 | 17 | ### Fully cross platform ### 18 | 19 | Whether you are developing Windows, Mac , IOS or Android applications, the myCloudData REST Client will suit your needs. 20 | 21 | ### Open Source ### 22 | The myCloudData REST Client is completely open-source and hosted on GitHub. That means that you can freely customize the code and add any functionality that it might be lacking for your specific project. 23 | 24 | ### Free ### 25 | You can use the myCloudData REST Client completely free of charge for any commercial or non-commercial project. 26 | 27 | The free myCloudData REST client component is based on the REST technology that is included in Delphi 10.1 Berlin. It can be used with your Delphi 10.1 Berlin IDE as-is, no need to install extra commercial libraries. -------------------------------------------------------------------------------- /REST.TMS.myCloudDataRestClient.Data.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/REST.TMS.myCloudDataRestClient.Data.pas -------------------------------------------------------------------------------- /REST.TMS.myCloudDataRestClient.Data.pas.rej: -------------------------------------------------------------------------------- 1 | diff a/REST.TMS.myCloudDataRestClient.Data.pas b/REST.TMS.myCloudDataRestClient.Data.pas (rejected hunks) 2 | @@ -448,8 +448,8 @@ 3 | 4 | TMyCloudDataTables = class(TMyCloudDataModelList) 5 | private 6 | - function LoadItems(): TObjectList; 7 | - function TryParseJSON(AJSONString: string; out AResult: TObjectList): boolean; 8 | + procedure LoadItems; 9 | + function TryParseJSON(AJSONString: string): boolean; 10 | public 11 | constructor Create(AOwner: TCustomMyCloudDataRESTClient); override; 12 | function CreateTable(ATableName: string): TMyCloudDataTable; 13 | -------------------------------------------------------------------------------- /REST.TMS.myCloudDataRestClient.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/REST.TMS.myCloudDataRestClient.pas -------------------------------------------------------------------------------- /REST.TMSMyCloudDataRestClient.dpk: -------------------------------------------------------------------------------- 1 | package Rest.TMSMyCloudDataRestClient; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$IMPLICITBUILD ON} 29 | 30 | requires 31 | rtl, 32 | CustomIPTransport, 33 | bindengine, 34 | bindcomp, 35 | RESTComponents; 36 | 37 | contains 38 | REST.TMS.myCloudDataRestClient.Data in 'REST.TMS.myCloudDataRestClient.Data.pas', 39 | REST.TMS.myCloudDataRestClient in 'REST.TMS.myCloudDataRestClient.pas'; 40 | 41 | end. 42 | 43 | -------------------------------------------------------------------------------- /REST.TMSMyCloudDataRestClient.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {4334B153-FCBF-4FFC-B62E-B52BF6C1AF69} 4 | Rest.TMSMyCloudDataRestClient.dpk 5 | 18.1 6 | None 7 | True 8 | Debug 9 | Win32 10 | 17 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Base 34 | true 35 | 36 | 37 | true 38 | Base 39 | true 40 | 41 | 42 | true 43 | Base 44 | true 45 | 46 | 47 | true 48 | Cfg_1 49 | true 50 | true 51 | 52 | 53 | true 54 | Base 55 | true 56 | 57 | 58 | true 59 | All 60 | Rest_TMSMyCloudDataRestClient 61 | true 62 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 63 | .\$(Platform)\$(Config) 64 | .\$(Platform)\$(Config) 65 | false 66 | false 67 | false 68 | false 69 | false 70 | 71 | 72 | package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= 73 | Debug 74 | None 75 | android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar 76 | 77 | 78 | None 79 | 80 | 81 | None 82 | 83 | 84 | None 85 | 86 | 87 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 88 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 89 | true 90 | 1033 91 | 92 | 93 | DEBUG;$(DCC_Define) 94 | true 95 | false 96 | true 97 | true 98 | true 99 | 100 | 101 | true 102 | 1033 103 | false 104 | 105 | 106 | false 107 | RELEASE;$(DCC_Define) 108 | 0 109 | 0 110 | 111 | 112 | 113 | MainSource 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | Cfg_2 134 | Base 135 | 136 | 137 | Base 138 | 139 | 140 | Cfg_1 141 | Base 142 | 143 | 144 | 145 | Delphi.Personality.12 146 | Package 147 | 148 | 149 | 150 | Rest.TMSMyCloudDataRestClient.dpk 151 | 152 | 153 | 154 | 155 | 156 | REST_TMSMyCloudDataRestClient.bpl 157 | true 158 | 159 | 160 | 161 | 162 | true 163 | 164 | 165 | 166 | 167 | true 168 | 169 | 170 | 171 | 172 | true 173 | 174 | 175 | 176 | 177 | true 178 | 179 | 180 | 181 | 182 | 183 | Contents\Resources 184 | 1 185 | 186 | 187 | 188 | 189 | classes 190 | 1 191 | 192 | 193 | 194 | 195 | Contents\MacOS 196 | 0 197 | 198 | 199 | 1 200 | 201 | 202 | 203 | 204 | 1 205 | 206 | 207 | 1 208 | 209 | 210 | 1 211 | 212 | 213 | 214 | 215 | res\drawable-xxhdpi 216 | 1 217 | 218 | 219 | 220 | 221 | library\lib\mips 222 | 1 223 | 224 | 225 | 226 | 227 | 1 228 | 229 | 230 | 1 231 | 232 | 233 | 0 234 | 235 | 236 | 1 237 | 238 | 239 | 1 240 | 241 | 242 | library\lib\armeabi-v7a 243 | 1 244 | 245 | 246 | 1 247 | 248 | 249 | 250 | 251 | 0 252 | 253 | 254 | 1 255 | .framework 256 | 257 | 258 | 259 | 260 | 1 261 | 262 | 263 | 1 264 | 265 | 266 | 267 | 268 | 1 269 | 270 | 271 | 1 272 | 273 | 274 | 1 275 | 276 | 277 | 278 | 279 | 1 280 | 281 | 282 | 1 283 | 284 | 285 | 1 286 | 287 | 288 | 289 | 290 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 291 | 1 292 | 293 | 294 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 295 | 1 296 | 297 | 298 | 299 | 300 | 1 301 | 302 | 303 | 1 304 | 305 | 306 | 1 307 | 308 | 309 | 310 | 311 | 312 | library\lib\armeabi 313 | 1 314 | 315 | 316 | 317 | 318 | 0 319 | 320 | 321 | 1 322 | 323 | 324 | 1 325 | 326 | 327 | 328 | 329 | 1 330 | 331 | 332 | 1 333 | 334 | 335 | 1 336 | 337 | 338 | 339 | 340 | res\drawable-normal 341 | 1 342 | 343 | 344 | 345 | 346 | res\drawable-xhdpi 347 | 1 348 | 349 | 350 | 351 | 352 | res\drawable-large 353 | 1 354 | 355 | 356 | 357 | 358 | 1 359 | 360 | 361 | 1 362 | 363 | 364 | 1 365 | 366 | 367 | 368 | 369 | Assets 370 | 1 371 | 372 | 373 | Assets 374 | 1 375 | 376 | 377 | 378 | 379 | 380 | res\drawable-hdpi 381 | 1 382 | 383 | 384 | 385 | 386 | library\lib\armeabi-v7a 387 | 1 388 | 389 | 390 | 391 | 392 | 393 | 394 | Assets 395 | 1 396 | 397 | 398 | Assets 399 | 1 400 | 401 | 402 | 403 | 404 | 1 405 | 406 | 407 | 1 408 | 409 | 410 | 1 411 | 412 | 413 | 414 | 415 | res\values 416 | 1 417 | 418 | 419 | 420 | 421 | res\drawable-small 422 | 1 423 | 424 | 425 | 426 | 427 | res\drawable 428 | 1 429 | 430 | 431 | 432 | 433 | 1 434 | 435 | 436 | 1 437 | 438 | 439 | 1 440 | 441 | 442 | 443 | 444 | 1 445 | 446 | 447 | 448 | 449 | res\drawable 450 | 1 451 | 452 | 453 | 454 | 455 | 0 456 | 457 | 458 | 0 459 | 460 | 461 | 0 462 | 463 | 464 | 0 465 | 466 | 467 | 0 468 | 469 | 470 | 0 471 | 472 | 473 | 474 | 475 | library\lib\armeabi-v7a 476 | 1 477 | 478 | 479 | 480 | 481 | 0 482 | .bpl 483 | 484 | 485 | 1 486 | .dylib 487 | 488 | 489 | 1 490 | .dylib 491 | 492 | 493 | 1 494 | .dylib 495 | 496 | 497 | 1 498 | .dylib 499 | 500 | 501 | 502 | 503 | res\drawable-mdpi 504 | 1 505 | 506 | 507 | 508 | 509 | res\drawable-xlarge 510 | 1 511 | 512 | 513 | 514 | 515 | res\drawable-ldpi 516 | 1 517 | 518 | 519 | 520 | 521 | 0 522 | .dll;.bpl 523 | 524 | 525 | 1 526 | .dylib 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | True 540 | False 541 | False 542 | False 543 | False 544 | True 545 | False 546 | 547 | True 548 | 549 | 12 550 | 551 | 552 | 553 | 554 | 555 | -------------------------------------------------------------------------------- /REST.TMSMyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/REST.TMSMyCloudDataRestClient.res -------------------------------------------------------------------------------- /TMS myCloudData RESTClient.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {70CDB392-4CF3-4ADA-B5A6-313BE0122B1A} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Default.Personality.12 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /TMSMyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/TMSMyCloudDataRestClient.res -------------------------------------------------------------------------------- /VCL.TMS.myCloudDataRestClient.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/VCL.TMS.myCloudDataRestClient.pas -------------------------------------------------------------------------------- /VCL.TMS.myCloudDataRestClientReg.dcr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/VCL.TMS.myCloudDataRestClientReg.dcr -------------------------------------------------------------------------------- /VCL.TMS.myCloudDataRestClientReg.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/VCL.TMS.myCloudDataRestClientReg.pas -------------------------------------------------------------------------------- /VCL.TMSMyCloudDataRestClient.dpk: -------------------------------------------------------------------------------- 1 | package VCL.TMSMyCloudDataRestClient; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'TMS myCloudData RESTClient'} 29 | {$IMPLICITBUILD ON} 30 | 31 | requires 32 | rtl, 33 | CustomIPTransport, 34 | bindengine, 35 | bindcomp, 36 | RESTComponents, 37 | vcl, 38 | vclie, 39 | VCLRESTComponents, 40 | vclimg, 41 | Rest.TMSMyCloudDataRestClient; 42 | 43 | contains 44 | VCL.TMS.myCloudDataRestClient in 'VCL.TMS.myCloudDataRestClient.pas', 45 | VCL.TMS.myCloudDataRestClientReg in 'VCL.TMS.myCloudDataRestClientReg.pas'; 46 | 47 | end. 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /VCL.TMSMyCloudDataRestClient.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {89728AD8-0509-4E9E-997C-0A19090AEFDC} 4 | VCL.TMSMyCloudDataRestClient.dpk 5 | 18.2 6 | None 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Base 34 | true 35 | 36 | 37 | true 38 | Base 39 | true 40 | 41 | 42 | true 43 | Base 44 | true 45 | 46 | 47 | true 48 | Base 49 | true 50 | 51 | 52 | true 53 | Base 54 | true 55 | 56 | 57 | true 58 | Cfg_1 59 | true 60 | true 61 | 62 | 63 | true 64 | Base 65 | true 66 | 67 | 68 | 1033 69 | true 70 | true 71 | VCL_TMSMyCloudDataRestClient 72 | All 73 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.imaging;$(DCC_Namespace) 74 | .\$(Platform)\$(Config) 75 | .\$(Platform)\$(Config) 76 | false 77 | false 78 | false 79 | false 80 | false 81 | 82 | 83 | rtl;CustomIPTransport;bindengine;bindcomp;RESTComponents;$(DCC_UsePackage) 84 | None 85 | android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar 86 | 87 | 88 | rtl;CustomIPTransport;bindengine;bindcomp;RESTComponents;$(DCC_UsePackage) 89 | None 90 | 91 | 92 | rtl;CustomIPTransport;bindengine;bindcomp;RESTComponents;$(DCC_UsePackage) 93 | None 94 | 95 | 96 | rtl;CustomIPTransport;bindengine;bindcomp;RESTComponents;$(DCC_UsePackage) 97 | None 98 | 99 | 100 | rtl;CustomIPTransport;bindengine;bindcomp;RESTComponents;$(DCC_UsePackage) 101 | 102 | 103 | rtl;vcl;vclimg;vclie;CustomIPTransport;bindengine;bindcomp;VCLRESTComponents;RESTComponents;$(DCC_UsePackage) 104 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName) 105 | true 106 | 1033 107 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 108 | 109 | 110 | rtl;vcl;vclimg;vclie;CustomIPTransport;bindengine;bindcomp;VCLRESTComponents;RESTComponents;$(DCC_UsePackage) 111 | 112 | 113 | DEBUG;$(DCC_Define) 114 | true 115 | false 116 | true 117 | true 118 | true 119 | 120 | 121 | TMS myCloudData RESTClient 122 | true 123 | false 124 | 125 | 126 | false 127 | RELEASE;$(DCC_Define) 128 | 0 129 | 0 130 | 131 | 132 | 133 | MainSource 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | Cfg_2 150 | Base 151 | 152 | 153 | Base 154 | 155 | 156 | Cfg_1 157 | Base 158 | 159 | 160 | 161 | Delphi.Personality.12 162 | Package 163 | 164 | 165 | 166 | VCL.TMSMyCloudDataRestClient.dpk 167 | 168 | 169 | 170 | 171 | 172 | true 173 | 174 | 175 | 176 | 177 | true 178 | 179 | 180 | 181 | 182 | true 183 | 184 | 185 | 186 | 187 | true 188 | 189 | 190 | 191 | 192 | VCL_TMSMyCloudDataRestClient.bpl 193 | true 194 | 195 | 196 | 197 | 198 | 199 | Contents\Resources 200 | 1 201 | 202 | 203 | 204 | 205 | classes 206 | 1 207 | 208 | 209 | 210 | 211 | Contents\MacOS 212 | 0 213 | 214 | 215 | 1 216 | 217 | 218 | 219 | 220 | 1 221 | 222 | 223 | 1 224 | 225 | 226 | 1 227 | 228 | 229 | 230 | 231 | res\drawable-xxhdpi 232 | 1 233 | 234 | 235 | 236 | 237 | library\lib\mips 238 | 1 239 | 240 | 241 | 242 | 243 | 1 244 | 245 | 246 | 1 247 | 248 | 249 | 0 250 | 251 | 252 | 1 253 | 254 | 255 | 1 256 | 257 | 258 | library\lib\armeabi-v7a 259 | 1 260 | 261 | 262 | 1 263 | 264 | 265 | 266 | 267 | 0 268 | 269 | 270 | 1 271 | .framework 272 | 273 | 274 | 275 | 276 | 1 277 | 278 | 279 | 1 280 | 281 | 282 | 283 | 284 | 1 285 | 286 | 287 | 1 288 | 289 | 290 | 1 291 | 292 | 293 | 294 | 295 | 1 296 | 297 | 298 | 1 299 | 300 | 301 | 1 302 | 303 | 304 | 305 | 306 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 307 | 1 308 | 309 | 310 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 311 | 1 312 | 313 | 314 | 315 | 316 | 1 317 | 318 | 319 | 1 320 | 321 | 322 | 1 323 | 324 | 325 | 326 | 327 | 328 | library\lib\armeabi 329 | 1 330 | 331 | 332 | 333 | 334 | 0 335 | 336 | 337 | 1 338 | 339 | 340 | 1 341 | 342 | 343 | 344 | 345 | 1 346 | 347 | 348 | 1 349 | 350 | 351 | 1 352 | 353 | 354 | 355 | 356 | res\drawable-normal 357 | 1 358 | 359 | 360 | 361 | 362 | res\drawable-xhdpi 363 | 1 364 | 365 | 366 | 367 | 368 | res\drawable-large 369 | 1 370 | 371 | 372 | 373 | 374 | 1 375 | 376 | 377 | 1 378 | 379 | 380 | 1 381 | 382 | 383 | 384 | 385 | Assets 386 | 1 387 | 388 | 389 | Assets 390 | 1 391 | 392 | 393 | 394 | 395 | 396 | res\drawable-hdpi 397 | 1 398 | 399 | 400 | 401 | 402 | library\lib\armeabi-v7a 403 | 1 404 | 405 | 406 | 407 | 408 | 409 | 410 | Assets 411 | 1 412 | 413 | 414 | Assets 415 | 1 416 | 417 | 418 | 419 | 420 | 1 421 | 422 | 423 | 1 424 | 425 | 426 | 1 427 | 428 | 429 | 430 | 431 | res\values 432 | 1 433 | 434 | 435 | 436 | 437 | res\drawable-small 438 | 1 439 | 440 | 441 | 442 | 443 | res\drawable 444 | 1 445 | 446 | 447 | 448 | 449 | 1 450 | 451 | 452 | 1 453 | 454 | 455 | 1 456 | 457 | 458 | 459 | 460 | 1 461 | 462 | 463 | 464 | 465 | res\drawable 466 | 1 467 | 468 | 469 | 470 | 471 | 0 472 | 473 | 474 | 0 475 | 476 | 477 | 0 478 | 479 | 480 | 0 481 | 482 | 483 | 0 484 | 485 | 486 | 0 487 | 488 | 489 | 490 | 491 | library\lib\armeabi-v7a 492 | 1 493 | 494 | 495 | 496 | 497 | 0 498 | .bpl 499 | 500 | 501 | 1 502 | .dylib 503 | 504 | 505 | 1 506 | .dylib 507 | 508 | 509 | 1 510 | .dylib 511 | 512 | 513 | 1 514 | .dylib 515 | 516 | 517 | 518 | 519 | res\drawable-mdpi 520 | 1 521 | 522 | 523 | 524 | 525 | res\drawable-xlarge 526 | 1 527 | 528 | 529 | 530 | 531 | res\drawable-ldpi 532 | 1 533 | 534 | 535 | 536 | 537 | 0 538 | .dll;.bpl 539 | 540 | 541 | 1 542 | .dylib 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | False 556 | False 557 | False 558 | False 559 | False 560 | True 561 | False 562 | 563 | True 564 | 565 | 12 566 | 567 | 568 | 569 | 570 | 571 | -------------------------------------------------------------------------------- /VCL.TMSMyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/VCL.TMSMyCloudDataRestClient.res -------------------------------------------------------------------------------- /VCLTMSMyCloudDataRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmssoftware/TMS-myCloudData-RESTClient/bf90cf83e19b594e72849d2275f80820a6e968da/VCLTMSMyCloudDataRestClient.res --------------------------------------------------------------------------------