diff --git a/samples/articles_crud/BusinessObjects.pas b/samples/articles_crud_server/BusinessObjects.pas similarity index 100% rename from samples/articles_crud/BusinessObjects.pas rename to samples/articles_crud_server/BusinessObjects.pas diff --git a/samples/articles_crud/Commons.pas b/samples/articles_crud_server/Commons.pas similarity index 100% rename from samples/articles_crud/Commons.pas rename to samples/articles_crud_server/Commons.pas diff --git a/samples/articles_crud/Controllers.Articles.pas b/samples/articles_crud_server/Controllers.Articles.pas similarity index 100% rename from samples/articles_crud/Controllers.Articles.pas rename to samples/articles_crud_server/Controllers.Articles.pas diff --git a/samples/articles_crud/Controllers.Base.pas b/samples/articles_crud_server/Controllers.Base.pas similarity index 100% rename from samples/articles_crud/Controllers.Base.pas rename to samples/articles_crud_server/Controllers.Base.pas diff --git a/samples/articles_crud/MainDM.dfm b/samples/articles_crud_server/MainDM.dfm similarity index 100% rename from samples/articles_crud/MainDM.dfm rename to samples/articles_crud_server/MainDM.dfm diff --git a/samples/articles_crud/MainDM.pas b/samples/articles_crud_server/MainDM.pas similarity index 100% rename from samples/articles_crud/MainDM.pas rename to samples/articles_crud_server/MainDM.pas diff --git a/samples/articles_crud/Services.pas b/samples/articles_crud_server/Services.pas similarity index 100% rename from samples/articles_crud/Services.pas rename to samples/articles_crud_server/Services.pas diff --git a/samples/articles_crud/WebModuleUnit1.dfm b/samples/articles_crud_server/WebModuleUnit1.dfm similarity index 100% rename from samples/articles_crud/WebModuleUnit1.dfm rename to samples/articles_crud_server/WebModuleUnit1.dfm diff --git a/samples/articles_crud/WebModuleUnit1.pas b/samples/articles_crud_server/WebModuleUnit1.pas similarity index 100% rename from samples/articles_crud/WebModuleUnit1.pas rename to samples/articles_crud_server/WebModuleUnit1.pas diff --git a/samples/articles_crud/articles_crud.dpr b/samples/articles_crud_server/articles_crud.dpr similarity index 100% rename from samples/articles_crud/articles_crud.dpr rename to samples/articles_crud_server/articles_crud.dpr diff --git a/samples/articles_crud/articles_crud.dproj b/samples/articles_crud_server/articles_crud.dproj similarity index 100% rename from samples/articles_crud/articles_crud.dproj rename to samples/articles_crud_server/articles_crud.dproj diff --git a/samples/BasicDemo/App1MainControllerU.pas b/samples/basicdemo_server/App1MainControllerU.pas similarity index 100% rename from samples/BasicDemo/App1MainControllerU.pas rename to samples/basicdemo_server/App1MainControllerU.pas diff --git a/samples/BasicDemo/BasicDemo.dpr b/samples/basicdemo_server/BasicDemo.dpr similarity index 100% rename from samples/BasicDemo/BasicDemo.dpr rename to samples/basicdemo_server/BasicDemo.dpr diff --git a/samples/BasicDemo/BasicDemo.dproj b/samples/basicdemo_server/BasicDemo.dproj similarity index 100% rename from samples/BasicDemo/BasicDemo.dproj rename to samples/basicdemo_server/BasicDemo.dproj diff --git a/samples/BasicDemo/BasicDemo.res b/samples/basicdemo_server/BasicDemo.res similarity index 100% rename from samples/BasicDemo/BasicDemo.res rename to samples/basicdemo_server/BasicDemo.res diff --git a/samples/BasicDemo/WebModuleUnit1.dfm b/samples/basicdemo_server/WebModuleUnit1.dfm similarity index 100% rename from samples/BasicDemo/WebModuleUnit1.dfm rename to samples/basicdemo_server/WebModuleUnit1.dfm diff --git a/samples/BasicDemo/WebModuleUnit1.pas b/samples/basicdemo_server/WebModuleUnit1.pas similarity index 100% rename from samples/BasicDemo/WebModuleUnit1.pas rename to samples/basicdemo_server/WebModuleUnit1.pas diff --git a/samples/BasicDemo/WebModuleUnit1.vlb b/samples/basicdemo_server/WebModuleUnit1.vlb similarity index 100% rename from samples/BasicDemo/WebModuleUnit1.vlb rename to samples/basicdemo_server/WebModuleUnit1.vlb diff --git a/samples/BasicDemo/Win32/Debug/BasicDemo.drc b/samples/basicdemo_server/Win32/Debug/BasicDemo.drc similarity index 100% rename from samples/BasicDemo/Win32/Debug/BasicDemo.drc rename to samples/basicdemo_server/Win32/Debug/BasicDemo.drc diff --git a/samples/BasicDemo/Win32/Debug/FastMM_FullDebugMode.dll b/samples/basicdemo_server/Win32/Debug/FastMM_FullDebugMode.dll similarity index 100% rename from samples/BasicDemo/Win32/Debug/FastMM_FullDebugMode.dll rename to samples/basicdemo_server/Win32/Debug/FastMM_FullDebugMode.dll diff --git a/samples/BasicDemo/Win32/Debug/app1.drc b/samples/basicdemo_server/Win32/Debug/app1.drc similarity index 100% rename from samples/BasicDemo/Win32/Debug/app1.drc rename to samples/basicdemo_server/Win32/Debug/app1.drc diff --git a/samples/BasicDemo/bin/www/public_html/css/bootstrap-responsive.css b/samples/basicdemo_server/bin/www/public_html/css/bootstrap-responsive.css similarity index 100% rename from samples/BasicDemo/bin/www/public_html/css/bootstrap-responsive.css rename to samples/basicdemo_server/bin/www/public_html/css/bootstrap-responsive.css diff --git a/samples/BasicDemo/bin/www/public_html/css/bootstrap-responsive.min.css b/samples/basicdemo_server/bin/www/public_html/css/bootstrap-responsive.min.css similarity index 100% rename from samples/BasicDemo/bin/www/public_html/css/bootstrap-responsive.min.css rename to samples/basicdemo_server/bin/www/public_html/css/bootstrap-responsive.min.css diff --git a/samples/BasicDemo/bin/www/public_html/css/bootstrap.css b/samples/basicdemo_server/bin/www/public_html/css/bootstrap.css similarity index 100% rename from samples/BasicDemo/bin/www/public_html/css/bootstrap.css rename to samples/basicdemo_server/bin/www/public_html/css/bootstrap.css diff --git a/samples/BasicDemo/bin/www/public_html/css/bootstrap.min.css b/samples/basicdemo_server/bin/www/public_html/css/bootstrap.min.css similarity index 100% rename from samples/BasicDemo/bin/www/public_html/css/bootstrap.min.css rename to samples/basicdemo_server/bin/www/public_html/css/bootstrap.min.css diff --git a/samples/BasicDemo/bin/www/public_html/img/glyphicons-halflings-white.png b/samples/basicdemo_server/bin/www/public_html/img/glyphicons-halflings-white.png similarity index 100% rename from samples/BasicDemo/bin/www/public_html/img/glyphicons-halflings-white.png rename to samples/basicdemo_server/bin/www/public_html/img/glyphicons-halflings-white.png diff --git a/samples/BasicDemo/bin/www/public_html/img/glyphicons-halflings.png b/samples/basicdemo_server/bin/www/public_html/img/glyphicons-halflings.png similarity index 100% rename from samples/BasicDemo/bin/www/public_html/img/glyphicons-halflings.png rename to samples/basicdemo_server/bin/www/public_html/img/glyphicons-halflings.png diff --git a/samples/BasicDemo/bin/www/public_html/index.html b/samples/basicdemo_server/bin/www/public_html/index.html similarity index 100% rename from samples/BasicDemo/bin/www/public_html/index.html rename to samples/basicdemo_server/bin/www/public_html/index.html diff --git a/samples/BasicDemo/bin/www/public_html/js/app.js b/samples/basicdemo_server/bin/www/public_html/js/app.js similarity index 100% rename from samples/BasicDemo/bin/www/public_html/js/app.js rename to samples/basicdemo_server/bin/www/public_html/js/app.js diff --git a/samples/BasicDemo/bin/www/public_html/js/bootstrap.js b/samples/basicdemo_server/bin/www/public_html/js/bootstrap.js similarity index 100% rename from samples/BasicDemo/bin/www/public_html/js/bootstrap.js rename to samples/basicdemo_server/bin/www/public_html/js/bootstrap.js diff --git a/samples/BasicDemo/bin/www/public_html/js/bootstrap.min.js b/samples/basicdemo_server/bin/www/public_html/js/bootstrap.min.js similarity index 100% rename from samples/BasicDemo/bin/www/public_html/js/bootstrap.min.js rename to samples/basicdemo_server/bin/www/public_html/js/bootstrap.min.js diff --git a/samples/BasicDemo/bin/www/public_html/js/libs/jquery-1.8.3/jquery.min.js b/samples/basicdemo_server/bin/www/public_html/js/libs/jquery-1.8.3/jquery.min.js similarity index 100% rename from samples/BasicDemo/bin/www/public_html/js/libs/jquery-1.8.3/jquery.min.js rename to samples/basicdemo_server/bin/www/public_html/js/libs/jquery-1.8.3/jquery.min.js diff --git a/samples/BasicDemoVCLClient/BasicDemoVCLClient.dpr b/samples/basicdemo_vclclient/BasicDemoVCLClient.dpr similarity index 100% rename from samples/BasicDemoVCLClient/BasicDemoVCLClient.dpr rename to samples/basicdemo_vclclient/BasicDemoVCLClient.dpr diff --git a/samples/BasicDemoVCLClient/BasicDemoVCLClient.dproj b/samples/basicdemo_vclclient/BasicDemoVCLClient.dproj similarity index 100% rename from samples/BasicDemoVCLClient/BasicDemoVCLClient.dproj rename to samples/basicdemo_vclclient/BasicDemoVCLClient.dproj diff --git a/samples/BasicDemoVCLClient/Unit1.dfm b/samples/basicdemo_vclclient/Unit1.dfm similarity index 100% rename from samples/BasicDemoVCLClient/Unit1.dfm rename to samples/basicdemo_vclclient/Unit1.dfm diff --git a/samples/BasicDemoVCLClient/Unit1.pas b/samples/basicdemo_vclclient/Unit1.pas similarity index 100% rename from samples/BasicDemoVCLClient/Unit1.pas rename to samples/basicdemo_vclclient/Unit1.pas diff --git a/samples/pushnotifications_mobileclient/Android/Debug/AndroidManifest.xml b/samples/pushnotifications_mobileclient/Android/Debug/AndroidManifest.xml new file mode 100644 index 00000000..f70015f3 --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/AndroidManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient.vsr b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient.vsr new file mode 100644 index 00000000..e82997de --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient.vsr @@ -0,0 +1,26 @@ +EXPORTED { + global: + _NativeMain; + __rsrc_*; + __rstr_*; + dbkFCallWrapperAddr; + __dbk_fcall_wrapper; + _DbgExcNotify; + _Unwind_VRS_Get; + _Unwind_VRS_Set; + _Unwind_Complete; + _Unwind_Resume_or_Rethrow; + _Unwind_GetDataRelBase; + _Unwind_GetTextRelBase; + _Unwind_GetLanguageSpecificData; + _Unwind_GetRegionStart; + _BorUnwind_RaiseException; + _BorUnwind_Resume; + _UnwindCppFrame; + UnwindCppPersonalityCommon; + _Unwind_DeleteException; + TMethodImplementationIntercept; + ExecJNI; + ANativeActivity_onCreate; + local: *; +}; diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/AndroidManifest.xml b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/AndroidManifest.xml new file mode 100644 index 00000000..f70015f3 --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/AndroidManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/library/lib/armeabi-v7a/gdbserver b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/library/lib/armeabi-v7a/gdbserver new file mode 100644 index 00000000..74614f71 Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/library/lib/armeabi-v7a/gdbserver differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-hdpi/ic_launcher.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..2850c82c Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-hdpi/ic_launcher.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-large/splash_image.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-large/splash_image.png new file mode 100644 index 00000000..babc829a Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-large/splash_image.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-ldpi/ic_launcher.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 00000000..6f594218 Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-ldpi/ic_launcher.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-mdpi/ic_launcher.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..9a6d8928 Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-mdpi/ic_launcher.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-normal/splash_image.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-normal/splash_image.png new file mode 100644 index 00000000..7266612b Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-normal/splash_image.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-small/splash_image.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-small/splash_image.png new file mode 100644 index 00000000..9a67bb33 Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-small/splash_image.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xhdpi/ic_launcher.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..fefe62ed Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xhdpi/ic_launcher.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xlarge/splash_image.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xlarge/splash_image.png new file mode 100644 index 00000000..72bd1918 Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xlarge/splash_image.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xxhdpi/ic_launcher.png b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0abc131d Binary files /dev/null and b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable/splash_image_def.xml b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable/splash_image_def.xml new file mode 100644 index 00000000..90fc726c --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/drawable/splash_image_def.xml @@ -0,0 +1,9 @@ + + diff --git a/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/values/styles.xml b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/values/styles.xml new file mode 100644 index 00000000..8a6563b1 --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/PushNotificationsMobileClient/res/values/styles.xml @@ -0,0 +1,6 @@ + + + diff --git a/samples/pushnotifications_mobileclient/Android/Debug/splash_image_def.xml b/samples/pushnotifications_mobileclient/Android/Debug/splash_image_def.xml new file mode 100644 index 00000000..90fc726c --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/splash_image_def.xml @@ -0,0 +1,9 @@ + + diff --git a/samples/pushnotifications_mobileclient/Android/Debug/styles.xml b/samples/pushnotifications_mobileclient/Android/Debug/styles.xml new file mode 100644 index 00000000..8a6563b1 --- /dev/null +++ b/samples/pushnotifications_mobileclient/Android/Debug/styles.xml @@ -0,0 +1,6 @@ + + + diff --git a/samples/pushnotifications_mobileclient/AndroidManifest.template.xml b/samples/pushnotifications_mobileclient/AndroidManifest.template.xml new file mode 100644 index 00000000..b5936845 --- /dev/null +++ b/samples/pushnotifications_mobileclient/AndroidManifest.template.xml @@ -0,0 +1,42 @@ + + + + + + +<%uses-permission%> + + + +<%application-meta-data%> + <%services%> + + + + + + + + + + <%activity%> + <%receivers%> + + + diff --git a/samples/pushnotifications_mobileclient/MainFormU.fmx b/samples/pushnotifications_mobileclient/MainFormU.fmx new file mode 100644 index 00000000..6ae17731 --- /dev/null +++ b/samples/pushnotifications_mobileclient/MainFormU.fmx @@ -0,0 +1,118 @@ +object Form7: TForm7 + Left = 0 + Top = 0 + Caption = 'Form7' + ClientHeight = 506 + ClientWidth = 423 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [Desktop] + OnCreate = FormCreate + DesignerMasterStyle = 0 + object Panel1: TPanel + Align = Top + Size.Width = 423.000000000000000000 + Size.Height = 57.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + object Edit1: TEdit + Touch.InteractiveGestures = [LongTap, DoubleTap] + Align = Client + TabOrder = 0 + Margins.Left = 5.000000000000000000 + Margins.Top = 5.000000000000000000 + Margins.Right = 5.000000000000000000 + Margins.Bottom = 5.000000000000000000 + Size.Width = 297.000000000000000000 + Size.Height = 47.000000000000000000 + Size.PlatformDefault = False + end + object Button2: TButton + Action = acLogin + Align = Right + Enabled = True + ImageIndex = -1 + Margins.Left = 5.000000000000000000 + Margins.Top = 5.000000000000000000 + Margins.Right = 5.000000000000000000 + Margins.Bottom = 5.000000000000000000 + Position.X = 312.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 47.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Visible = True + end + end + object ListBox1: TListBox + Align = Client + Margins.Left = 5.000000000000000000 + Margins.Right = 5.000000000000000000 + Size.Width = 413.000000000000000000 + Size.Height = 383.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + DisableFocusEffect = True + DefaultItemStyles.ItemStyle = '' + DefaultItemStyles.GroupHeaderStyle = '' + DefaultItemStyles.GroupFooterStyle = '' + Viewport.Width = 409.000000000000000000 + Viewport.Height = 379.000000000000000000 + end + object Panel2: TPanel + Align = Bottom + Position.Y = 440.000000000000000000 + Size.Width = 423.000000000000000000 + Size.Height = 66.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + object Memo1: TMemo + Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] + DataDetectorTypes = [] + Align = Client + Margins.Left = 5.000000000000000000 + Margins.Top = 5.000000000000000000 + Margins.Right = 5.000000000000000000 + Margins.Bottom = 5.000000000000000000 + Size.Width = 297.000000000000000000 + Size.Height = 56.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + Viewport.Width = 293.000000000000000000 + Viewport.Height = 52.000000000000000000 + end + object Button1: TButton + Action = acSend + Align = Right + Enabled = True + ImageIndex = -1 + Margins.Left = 5.000000000000000000 + Margins.Top = 5.000000000000000000 + Margins.Right = 5.000000000000000000 + Margins.Bottom = 5.000000000000000000 + Position.X = 312.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 56.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'speedbuttonstyle' + TabOrder = 1 + Visible = True + end + end + object ActionList1: TActionList + Left = 200 + Top = 240 + object acLogin: TAction + Text = 'Login' + OnExecute = acLoginExecute + OnUpdate = acLoginUpdate + end + object acSend: TAction + Text = 'Send' + OnExecute = acSendExecute + OnUpdate = acSendUpdate + end + end +end diff --git a/samples/pushnotifications_mobileclient/MainFormU.pas b/samples/pushnotifications_mobileclient/MainFormU.pas new file mode 100644 index 00000000..0d53288d --- /dev/null +++ b/samples/pushnotifications_mobileclient/MainFormU.pas @@ -0,0 +1,156 @@ +unit MainFormU; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, + FMX.ListBox, FMX.Controls.Presentation, FMX.StdCtrls, FMX.ScrollBox, FMX.Memo, + FMX.Edit, System.Actions, FMX.ActnList, FMX.DialogService, System.Net.HTTPClient; + +type + TForm7 = class(TForm) + Panel1: TPanel; + ListBox1: TListBox; + Panel2: TPanel; + Memo1: TMemo; + Button1: TButton; + Edit1: TEdit; + Button2: TButton; + ActionList1: TActionList; + acLogin: TAction; + acSend: TAction; + procedure acLoginUpdate(Sender: TObject); + procedure acSendUpdate(Sender: TObject); + procedure acLoginExecute(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure acSendExecute(Sender: TObject); + private + FLogged: Boolean; + FSendQueue: THTTPClient; + FUserName: string; + FPullThread: TThread; + public + { Public declarations } + end; + +var + Form7: TForm7; + +implementation + +uses System.JSON; + +{$R *.fmx} + + +const + BASEURL = 'http://192.168.3.75:8080'; + + +procedure TForm7.acLoginExecute(Sender: TObject); +begin + FUserName := Edit1.Text; + FLogged := not FUserName.Trim.IsEmpty; + + if FLogged then + begin + ListBox1.Items.Add('LOGGED AS ' + FUserName); + ListBox1.Items.Add('---'); + FPullThread := TThread.CreateAnonymousThread( + procedure + var + lHTTPClient: THTTPClient; + lRes: IHTTPResponse; + lContent: string; + lJObj: TJSONObject; + lJMessages: TJSONArray; + I: Integer; + lUserName: string; + lMessage: string; + begin + lHTTPClient := THTTPClient.Create; + lHTTPClient.ResponseTimeout := 30000; + while FLogged do + begin + try + lRes := lHTTPClient.Get(BASEURL + '/topics/test1/' + FUserName); + except + if lRes.StatusCode = 0 then + begin + Sleep(10000); + Continue; + end; + end; + if lRes.StatusCode = 200 then + begin + lContent := lRes.ContentAsString(TEncoding.UTF8); + lJObj := TJSONObject.ParseJSONValue(lContent) as TJSONObject; + try + lJMessages := lJObj.GetValue('data') as TJSONArray; + for I := 0 to lJMessages.Count - 1 do + begin + lUserName := lJMessages.Items[I].GetValue('username').Value; + lMessage := lJMessages.Items[I].GetValue('message').Value; + TThread.Synchronize(nil, + procedure + begin + ListBox1.Items.Add(TimeToStr(Time) + ' [' + lUserName + ']: ' + + lMessage.Trim); + ListBox1.SelectRange( + ListBox1.ItemByIndex(ListBox1.Items.Count - 1), + ListBox1.ItemByIndex(ListBox1.Items.Count - 1) + ); + end); + end; + finally + lJObj.Free; + end; + end; + end; + end); + FPullThread.Start; + end; +end; + +procedure TForm7.acLoginUpdate(Sender: TObject); +begin + acLogin.Enabled := not FLogged; +end; + +procedure TForm7.acSendExecute(Sender: TObject); +var + lBody: TStringStream; + lResp: IHTTPResponse; + lJObj: TJSONObject; +begin + lBody := TStringStream.Create; + try + lJObj := TJSONObject.Create; + try + lJObj.AddPair('username', FUserName); + lJObj.AddPair('message', Memo1.Lines.Text); + lBody.WriteString(lJObj.ToJSON); + finally + lJObj.Free; + end; + lBody.Position := 0; + lResp := FSendQueue.Post(BASEURL + '/topics/test1/' + FUserName, lBody); + if lResp.StatusCode <> 200 then + TDialogService.ShowMessage('Cannot send message: ' + lResp.StatusText); + finally + lBody.Free; + end; +end; + +procedure TForm7.acSendUpdate(Sender: TObject); +begin + acSend.Enabled := FLogged; +end; + +procedure TForm7.FormCreate(Sender: TObject); +begin + FSendQueue := THTTPClient.Create; +end; + +end. diff --git a/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.deployproj b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.deployproj new file mode 100644 index 00000000..db1bc04a --- /dev/null +++ b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.deployproj @@ -0,0 +1,223 @@ + + + + 12 + + + ENU5T16126001397 + + + iPhone5 + + + + + + + PushNotificationsMobileClient\ + PushNotificationsMobileClient.exe + ProjectOutput + 0 + + + True + True + + + + + PushNotificationsMobileClient.app\Contents\MacOS\ + libcgsqlite3.dylib + DependencyModule + 1 + + + True + + + PushNotificationsMobileClient.app\Contents\MacOS\ + libcgunwind.1.0.dylib + DependencyModule + 1 + + + True + + + + + PushNotificationsMobileClient\res\drawable-ldpi\ + ic_launcher.png + Android_LauncherIcon36 + 1 + + + True + + + PushNotificationsMobileClient\library\lib\armeabi-v7a\ + libPushNotificationsMobileClient.so + ProjectOutput + 1 + + + True + True + + + PushNotificationsMobileClient\ + AndroidManifest.xml + ProjectAndroidManifest + 1 + + + True + + + PushNotificationsMobileClient\library\lib\armeabi\ + libPushNotificationsMobileClient.so + AndroidLibnativeArmeabiFile + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-hdpi\ + ic_launcher.png + Android_LauncherIcon72 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-xxhdpi\ + ic_launcher.png + Android_LauncherIcon144 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-normal\ + splash_image.png + Android_SplashImage470 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-small\ + splash_image.png + Android_SplashImage426 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-large\ + splash_image.png + Android_SplashImage640 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-xlarge\ + splash_image.png + Android_SplashImage960 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-xhdpi\ + ic_launcher.png + Android_LauncherIcon96 + 1 + + + True + + + PushNotificationsMobileClient\res\drawable-mdpi\ + ic_launcher.png + Android_LauncherIcon48 + 1 + + + True + + + PushNotificationsMobileClient\library\lib\mips\ + libPushNotificationsMobileClient.so + AndroidLibnativeMipsFile + 1 + + + True + + + PushNotificationsMobileClient\classes\ + classes.dex + AndroidClassesDexFile + 1 + + + True + + + PushNotificationsMobileClient\library\lib\armeabi-v7a\ + gdbserver + AndroidGDBServer + 1 + + + True + + + PushNotificationsMobileClient\res\drawable\ + splash_image_def.xml + AndroidSplashImageDef + 1 + + + True + + + PushNotificationsMobileClient\res\values\ + styles.xml + AndroidSplashStyles + 1 + + + True + + + + + PushNotificationsMobileClient.app\ + libcgunwind.1.0.dylib + DependencyModule + 1 + + + True + + + PushNotificationsMobileClient.app\ + libPCRE.dylib + DependencyModule + 1 + + + True + + + diff --git a/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dpr b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dpr new file mode 100644 index 00000000..dd23d61f --- /dev/null +++ b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dpr @@ -0,0 +1,15 @@ +program PushNotificationsMobileClient; + +uses + System.StartUpCopy, + FMX.Forms, + MainFormU in 'MainFormU.pas' {Form7}; + +{$R *.res} + +begin + Application.Initialize; + Application.FormFactor.Orientations := [TFormOrientation.Portrait]; + Application.CreateForm(TForm7, Form7); + Application.Run; +end. diff --git a/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dproj b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dproj new file mode 100644 index 00000000..43973aa5 --- /dev/null +++ b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.dproj @@ -0,0 +1,875 @@ + + + {73833C73-3E07-456C-9871-BC3589DB2D2B} + 18.1 + FMX + PushNotificationsMobileClient.dpr + True + Debug + Android + 1119 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + $(BDS)\bin\delphi_PROJECTICNS.icns + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + $(BDS)\bin\delphi_PROJECTICON.ico + true + true + PushNotificationsMobileClient + true + true + true + true + true + true + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + 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 + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + Debug + DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;$(DCC_UsePackage) + true + 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= + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;fmxase;$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + Debug + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;fmxase;$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + Debug + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;soapmidas;DataSnapNativeClient;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;fmxase;$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + + + true + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;fmxase;$(DCC_UsePackage) + Debug + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user + + + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;frx24;vclib;FireDACDBXDriver;dbexpress;IndyCore;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;frxTee24;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;frxe24;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;frxDB24;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;fmxase;$(DCC_UsePackage) + $(BDS)\bin\default_app.manifest + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;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;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;fmxase;$(DCC_UsePackage) + $(BDS)\bin\default_app.manifest + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + 1 + + + true + true + false + + + true + true + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + true + true + + + true + true + + + + MainSource + + +
Form7
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Application + + + + PushNotificationsMobileClient.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + + ic_launcher.png + true + + + + + PushNotificationsMobileClient.exe + true + + + + + libPushNotificationsMobileClient.so + true + + + + + true + + + + + libPushNotificationsMobileClient.so + true + + + + + ic_launcher.png + true + + + + + true + + + + + ic_launcher.png + true + + + + + true + + + + + splash_image.png + true + + + + + splash_image.png + true + + + + + splash_image.png + true + + + + + splash_image.png + true + + + + + true + + + + + ic_launcher.png + true + + + + + ic_launcher.png + true + + + + + true + + + + + libPushNotificationsMobileClient.so + true + + + + + classes.dex + true + + + + + true + + + + + true + + + + + true + + + + + 1 + + + 1 + + + + + Contents\Resources + 1 + + + + + classes + 1 + + + + + Contents\MacOS + 0 + + + 1 + + + Contents\MacOS + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + 1 + + + 1 + + + 0 + + + 1 + + + Contents\MacOS + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + Contents\MacOS + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + Contents\MacOS + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-large + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + res\drawable-hdpi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + Contents + 1 + + + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + + + + + + + + + True + True + True + True + True + True + True + + + 12 + + + + + +
diff --git a/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.res b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/samples/pushnotifications_mobileclient/PushNotificationsMobileClient.res differ diff --git a/samples/pushnotifications_server/MainControllerU.pas b/samples/pushnotifications_server/MainControllerU.pas new file mode 100644 index 00000000..5b8fd71e --- /dev/null +++ b/samples/pushnotifications_server/MainControllerU.pas @@ -0,0 +1,146 @@ +unit MainControllerU; + +interface + +uses + MVCFramework; + +type + + [MVCPath('/')] + TMainController = class(TMVCController) + public + [MVCPath('/facts/datetime')] + [MVCHTTPMethod([httpGET])] + procedure GetDateTime; + + [MVCPath('/topics/($TopicName)/($ClientID)')] + [MVCHTTPMethod([httpGET])] + procedure TopicDequeue(const TopicName: string; const ClientID: string); + + [MVCPath('/topics/($TopicName)/($ClientID)')] + [MVCHTTPMethod([httpPOST])] + procedure TopicEnqueue(const TopicName: string; const ClientID: string); + + procedure OnBeforeAction(Context: TWebContext; const AActionName: string; + var Handled: Boolean); override; + procedure OnAfterAction(Context: TWebContext; const AActionName: string); override; + end; + +implementation + +uses + System.JSON, ObjectsMappers, System.SysUtils, StompClient, StompTypes, + MVCFramework.Commons; + +const + DEFAULT_TIMEOUT = 30000; // 30 secs + WAIT_TIMEOUT = 1000; // 500 msec + +procedure TMainController.GetDateTime; +var + lJObj: TJSONObject; +begin + lJObj := TJSONObject.Create; + try + lJObj.AddPair('datetime', ISODateTimeToString(Now)); + Render(lJObj); + except + lJObj.Free; + raise; + end; +end; + +procedure TMainController.OnAfterAction(Context: TWebContext; const AActionName: string); +begin + { Executed after each action } + inherited; +end; + +procedure TMainController.OnBeforeAction(Context: TWebContext; const AActionName: string; + var Handled: Boolean); +begin + { Executed before each action + if handled is true (or an exception is raised) the actual + action will not be called } + inherited; +end; + +procedure TMainController.TopicDequeue(const TopicName: string; const ClientID: string); +var + lStomp: IStompClient; + lStompFrame: IStompFrame; + lJObj: TJSONObject; + lJObjMsg: TJSONObject; + lJArrMessages: TJSONArray; + lTimeout: Integer; + lCount: UInt64; +begin + lStomp := TStompClient.Create; + lStomp.Connect('127.0.0.1', 61613, ClientID); + lStomp.Subscribe('/topic/' + TopicName, amAuto, + StompUtils.Headers + .Add(TStompHeaders.AUTO_DELETE, 'false') + .Add(TStompHeaders.Subscription(ClientID)) + .Add(TStompHeaders.Persistent(true)) + ); + lJObj := TJSONObject.Create; + try + lJArrMessages := TJSONArray.Create; + lJObj.AddPair('data', lJArrMessages); + lCount := 0; + lTimeout := DEFAULT_TIMEOUT; + while lStomp.Receive(lStompFrame, lTimeout) do + begin + Inc(lCount); + lJObjMsg := TJSONObject.ParseJSONValue(lStompFrame.Body) as TJSONObject; + lJArrMessages.AddElement(lJObjMsg); + lJObjMsg.AddPair('_messageid', lStompFrame.MessageID); + lTimeout := WAIT_TIMEOUT; // wait to see in there are already other messages + end; + + if lCount > 0 then + begin + lJObj.AddPair('status', 'ok'); + lJObj.AddPair('count', TJSONNumber.Create(lCount)); + end + else + begin + lJObj.AddPair('status', 'timeout'); + end; + Render(lJObj); + except + on E: Exception do + begin + lJObj.AddPair('status', 'error'); + lJObj.AddPair('error', E.Message); + lJObj.AddPair('classname', E.ClassName); + Render(lJObj); + end; + end; +end; + +procedure TMainController.TopicEnqueue(const TopicName, ClientID: string); +var + lJObj: TJSONObject; + lStomp: TStompClient; + lJMessage: TJSONObject; +begin + lJObj := Context.Request.BodyAsJSONObject; + if Assigned(lJObj.GetValue('message')) and (Assigned(lJObj.GetValue('username'))) then + begin + lJMessage := TJSONObject.Create; + try + lJMessage.AddPair('username', lJObj.GetValue('username').Value); + lJMessage.AddPair('message', lJObj.GetValue('message').Value); + lStomp := TStompClient.Create; + lStomp.Connect('127.0.0.1', 61613, ClientID); + lStomp.Send('/topic/' + TopicName, lJMessage.ToJSON); + finally + lJMessage.Free; + end; + end; + +end; + +end. diff --git a/samples/BasicDemoWithContainer/BasicDemo.res b/samples/pushnotifications_server/PushNotifications.res similarity index 100% rename from samples/BasicDemoWithContainer/BasicDemo.res rename to samples/pushnotifications_server/PushNotifications.res diff --git a/samples/pushnotifications_server/PushNotificationsServer.dpr b/samples/pushnotifications_server/PushNotificationsServer.dpr new file mode 100644 index 00000000..9cfe51a0 --- /dev/null +++ b/samples/pushnotifications_server/PushNotificationsServer.dpr @@ -0,0 +1,64 @@ +program PushNotificationsServer; + + {$APPTYPE CONSOLE} + +uses + System.SysUtils, + Winapi.Windows, + Winapi.ShellAPI, + Web.WebReq, + Web.WebBroker, + IdHTTPWebBrokerBridge, + MainControllerU in 'MainControllerU.pas', + WebModuleU in 'WebModuleU.pas' {MyWebModule: TWebModule}; + +{$R *.res} + +procedure RunServer(APort: Integer); +var + LInputRecord: TInputRecord; + LEvent: DWord; + LHandle: THandle; + LServer: TIdHTTPWebBrokerBridge; +begin + Writeln('** DMVCFramework Server **'); + Writeln(Format('Starting HTTP Server on port %d', [APort])); + LServer := TIdHTTPWebBrokerBridge.Create(nil); + try + LServer.DefaultPort := APort; + LServer.Active := True; + { more info about MaxConnections + http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=TIdCustomTCPServer_MaxConnections.html} + LServer.MaxConnections := 0; + { more info about ListenQueue + http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=TIdCustomTCPServer_ListenQueue.html} + LServer.ListenQueue := 200; + { Comment the next line to avoid the default browser startup } + ShellExecute(0, 'open', PChar('http://localhost:' + inttostr(APort)), nil, nil, SW_SHOWMAXIMIZED); + Writeln('Press ESC to stop the server'); + LHandle := GetStdHandle(STD_INPUT_HANDLE); + while True do + begin + Win32Check(ReadConsoleInput(LHandle, LInputRecord, 1, LEvent)); + if (LInputRecord.EventType = KEY_EVENT) and + LInputRecord.Event.KeyEvent.bKeyDown and + (LInputRecord.Event.KeyEvent.wVirtualKeyCode = VK_ESCAPE) then + break; + end; + finally + LServer.Free; + end; +end; + +begin + ReportMemoryLeaksOnShutdown := True; + try + if WebRequestHandler <> nil then + WebRequestHandler.WebModuleClass := WebModuleClass; + WebRequestHandlerProc.MaxConnections := 1024; + RunServer(8080); + except + on E: Exception do + Writeln(E.ClassName, ': ', E.Message); + end; +end. diff --git a/samples/pushnotifications_server/PushNotificationsServer.dproj b/samples/pushnotifications_server/PushNotificationsServer.dproj new file mode 100644 index 00000000..bbf85852 --- /dev/null +++ b/samples/pushnotifications_server/PushNotificationsServer.dproj @@ -0,0 +1,472 @@ + + + {982E1AC8-158D-49B4-A6B4-8C36D0596B35} + 18.1 + VCL + PushNotificationsServer.dpr + True + Debug + Win32 + 1 + Console + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + VCL;$(DCC_Framework) + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + $(DMVC);$(DCC_UnitSearchPath) + true + $(BDS)\bin\delphi_PROJECTICNS.icns + $(BDS)\bin\delphi_PROJECTICON.ico + PushNotificationsServer + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 1040 + .\$(Platform)\$(Config) + .\bin + false + false + false + false + false + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;frx24;vclib;FireDACDBXDriver;dbexpress;IndyCore;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;frxTee24;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;frxe24;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;frxDB24;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;fmxase;$(DCC_UsePackage) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 1033 + + + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;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;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;fmxase;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + (None) + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + +
MyWebModule
+ dfm + TWebModule +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Console + + + + PushNotificationsServer.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + + PushNotificationsServer.exe + true + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + + + Contents\Resources + 1 + + + + + classes + 1 + + + + + Contents\MacOS + 0 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + 1 + + + 1 + + + 0 + + + 1 + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-large + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + res\drawable-hdpi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + + + + + + + + + + True + False + + + 12 + + + + +
diff --git a/samples/winecellar/WineCellarServer.res b/samples/pushnotifications_server/PushNotificationsServer.res similarity index 100% rename from samples/winecellar/WineCellarServer.res rename to samples/pushnotifications_server/PushNotificationsServer.res diff --git a/samples/pushnotifications_server/WebModuleU.dfm b/samples/pushnotifications_server/WebModuleU.dfm new file mode 100644 index 00000000..018d0670 --- /dev/null +++ b/samples/pushnotifications_server/WebModuleU.dfm @@ -0,0 +1,8 @@ +object MyWebModule: TMyWebModule + OldCreateOrder = False + OnCreate = WebModuleCreate + OnDestroy = WebModuleDestroy + Actions = <> + Height = 230 + Width = 415 +end diff --git a/samples/pushnotifications_server/WebModuleU.pas b/samples/pushnotifications_server/WebModuleU.pas new file mode 100644 index 00000000..a29a3eaf --- /dev/null +++ b/samples/pushnotifications_server/WebModuleU.pas @@ -0,0 +1,61 @@ +unit WebModuleU; + +interface + +uses System.SysUtils, + System.Classes, + Web.HTTPApp, + MVCFramework; + +type + TMyWebModule = class(TWebModule) + procedure WebModuleCreate(Sender: TObject); + procedure WebModuleDestroy(Sender: TObject); + private + FMVC: TMVCEngine; + public + { Public declarations } + end; + +var + WebModuleClass: TComponentClass = TMyWebModule; + +implementation + +{$R *.dfm} + +uses MainControllerU, MVCFramework.Commons; + +procedure TMyWebModule.WebModuleCreate(Sender: TObject); +begin + FMVC := TMVCEngine.Create(Self, + procedure(Config: TMVCConfig) + begin + //enable static files + Config[TMVCConfigKey.DocumentRoot] := ExtractFilePath(GetModuleName(HInstance)) + '\www'; + // session timeout (0 means session cookie) + Config[TMVCConfigKey.SessionTimeout] := '0'; + //default content-type + Config[TMVCConfigKey.DefaultContentType] := TMVCConstants.DEFAULT_CONTENT_TYPE; + //default content charset + Config[TMVCConfigKey.DefaultContentCharset] := TMVCConstants.DEFAULT_CONTENT_CHARSET; + //unhandled actions are permitted? + Config[TMVCConfigKey.AllowUnhandledAction] := 'false'; + //default view file extension + Config[TMVCConfigKey.DefaultViewFileExtension] := 'html'; + //view path + Config[TMVCConfigKey.ViewPath] := 'templates'; + //Enable STOMP messaging controller + Config[TMVCConfigKey.Messaging] := 'false'; + //Enable Server Signature in response + Config[TMVCConfigKey.ExposeServerSignature] := 'true'; + end); + FMVC.AddController(TMainController); +end; + +procedure TMyWebModule.WebModuleDestroy(Sender: TObject); +begin + FMVC.Free; +end; + +end. diff --git a/samples/pushnotifications_server/WebWorkers.res b/samples/pushnotifications_server/WebWorkers.res new file mode 100644 index 00000000..6876088a Binary files /dev/null and b/samples/pushnotifications_server/WebWorkers.res differ diff --git a/samples/pushnotifications_server/bin/www/.vscode/settings.json b/samples/pushnotifications_server/bin/www/.vscode/settings.json new file mode 100644 index 00000000..5da56787 --- /dev/null +++ b/samples/pushnotifications_server/bin/www/.vscode/settings.json @@ -0,0 +1,3 @@ +// Inserire le impostazioni in questo file per sovrascrivere quelle utente e predefinite. +{ +} \ No newline at end of file diff --git a/samples/pushnotifications_server/bin/www/ajax.js b/samples/pushnotifications_server/bin/www/ajax.js new file mode 100644 index 00000000..07100609 --- /dev/null +++ b/samples/pushnotifications_server/bin/www/ajax.js @@ -0,0 +1,17 @@ +function AJAX() { + var me = this; + this.callback = null; + + function listener() { + me.callback(this.status, this.response); + } + + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", listener); + + this.get = function(URL, callback) { + me.callback = callback; + oReq.open("GET", URL); + oReq.send(); + } +} \ No newline at end of file diff --git a/samples/pushnotifications_server/bin/www/index.html b/samples/pushnotifications_server/bin/www/index.html new file mode 100644 index 00000000..5638503d --- /dev/null +++ b/samples/pushnotifications_server/bin/www/index.html @@ -0,0 +1,139 @@ + + +
+ +
+ + +
+
+

DelphiMVCFramework PushNotifications

+
+
+
+
+ + +
+ +
+ +
+
+
+ + + + + + \ No newline at end of file diff --git a/samples/pushnotifications_server/bin/www/myworkers.js b/samples/pushnotifications_server/bin/www/myworkers.js new file mode 100644 index 00000000..a372f297 --- /dev/null +++ b/samples/pushnotifications_server/bin/www/myworkers.js @@ -0,0 +1,22 @@ +importScripts('ajax.js') + +var ajax = new AJAX(); +var clientid = null; + +function loop() { + + ajax.get('/topics/test1/' + clientid, function(status, response) { + if (status == 200) { + //console.log(response); + var json = JSON.parse(response); + //console.log(json); + self.postMessage(json); + setTimeout(loop, 500); + } + }); +} + +self.onmessage = function(event) { + self.clientid = event.data; + self.loop(); +} \ No newline at end of file diff --git a/samples/routingsample/BusinessObjectsU.pas b/samples/routing/BusinessObjectsU.pas similarity index 100% rename from samples/routingsample/BusinessObjectsU.pas rename to samples/routing/BusinessObjectsU.pas diff --git a/samples/routingsample/RoutingSampleControllerU.pas b/samples/routing/RoutingSampleControllerU.pas similarity index 100% rename from samples/routingsample/RoutingSampleControllerU.pas rename to samples/routing/RoutingSampleControllerU.pas diff --git a/samples/routingsample/WebModuleU.dfm b/samples/routing/WebModuleU.dfm similarity index 100% rename from samples/routingsample/WebModuleU.dfm rename to samples/routing/WebModuleU.dfm diff --git a/samples/routingsample/WebModuleU.pas b/samples/routing/WebModuleU.pas similarity index 100% rename from samples/routingsample/WebModuleU.pas rename to samples/routing/WebModuleU.pas diff --git a/samples/routingsample/Win32/Debug/lua5.1.dll b/samples/routing/Win32/Debug/lua5.1.dll similarity index 100% rename from samples/routingsample/Win32/Debug/lua5.1.dll rename to samples/routing/Win32/Debug/lua5.1.dll diff --git a/samples/routingsample/routingsample.dpr b/samples/routing/routingsample.dpr similarity index 100% rename from samples/routingsample/routingsample.dpr rename to samples/routing/routingsample.dpr diff --git a/samples/routingsample/routingsample.dproj b/samples/routing/routingsample.dproj similarity index 100% rename from samples/routingsample/routingsample.dproj rename to samples/routing/routingsample.dproj diff --git a/samples/routingsample/routingsample.res b/samples/routing/routingsample.res similarity index 100% rename from samples/routingsample/routingsample.res rename to samples/routing/routingsample.res diff --git a/samples/routingsample/theSimplestServer.res b/samples/routing/theSimplestServer.res similarity index 100% rename from samples/routingsample/theSimplestServer.res rename to samples/routing/theSimplestServer.res diff --git a/samples/BasicDemoWithContainer/App1MainControllerU.pas b/samples/servercontainer/App1MainControllerU.pas similarity index 100% rename from samples/BasicDemoWithContainer/App1MainControllerU.pas rename to samples/servercontainer/App1MainControllerU.pas diff --git a/samples/BasicDemoWithContainer/BasicDemo.dpr b/samples/servercontainer/BasicDemo.dpr similarity index 100% rename from samples/BasicDemoWithContainer/BasicDemo.dpr rename to samples/servercontainer/BasicDemo.dpr diff --git a/samples/BasicDemoWithContainer/BasicDemo.dproj b/samples/servercontainer/BasicDemo.dproj similarity index 100% rename from samples/BasicDemoWithContainer/BasicDemo.dproj rename to samples/servercontainer/BasicDemo.dproj diff --git a/samples/servercontainer/BasicDemo.res b/samples/servercontainer/BasicDemo.res new file mode 100644 index 00000000..6876088a Binary files /dev/null and b/samples/servercontainer/BasicDemo.res differ diff --git a/samples/BasicDemoWithContainer/Clean.bat b/samples/servercontainer/Clean.bat similarity index 100% rename from samples/BasicDemoWithContainer/Clean.bat rename to samples/servercontainer/Clean.bat diff --git a/samples/BasicDemoWithContainer/WebModuleUnit1.dfm b/samples/servercontainer/WebModuleUnit1.dfm similarity index 100% rename from samples/BasicDemoWithContainer/WebModuleUnit1.dfm rename to samples/servercontainer/WebModuleUnit1.dfm diff --git a/samples/BasicDemoWithContainer/WebModuleUnit1.pas b/samples/servercontainer/WebModuleUnit1.pas similarity index 100% rename from samples/BasicDemoWithContainer/WebModuleUnit1.pas rename to samples/servercontainer/WebModuleUnit1.pas diff --git a/samples/BasicDemoWithContainer/WebModuleUnit1.vlb b/samples/servercontainer/WebModuleUnit1.vlb similarity index 100% rename from samples/BasicDemoWithContainer/WebModuleUnit1.vlb rename to samples/servercontainer/WebModuleUnit1.vlb diff --git a/samples/ssl/MyControllerU.pas b/samples/sslserver/MyControllerU.pas similarity index 100% rename from samples/ssl/MyControllerU.pas rename to samples/sslserver/MyControllerU.pas diff --git a/samples/ssl/MyObjectsU.pas b/samples/sslserver/MyObjectsU.pas similarity index 100% rename from samples/ssl/MyObjectsU.pas rename to samples/sslserver/MyObjectsU.pas diff --git a/samples/ssl/OPENSSL CERTIFICATES BUT BE PLACED HERE b/samples/sslserver/OPENSSL CERTIFICATES BUT BE PLACED HERE similarity index 100% rename from samples/ssl/OPENSSL CERTIFICATES BUT BE PLACED HERE rename to samples/sslserver/OPENSSL CERTIFICATES BUT BE PLACED HERE diff --git a/samples/ssl/README.TXT b/samples/sslserver/README.TXT similarity index 100% rename from samples/ssl/README.TXT rename to samples/sslserver/README.TXT diff --git a/samples/ssl/SSLSample.dpr b/samples/sslserver/SSLSample.dpr similarity index 100% rename from samples/ssl/SSLSample.dpr rename to samples/sslserver/SSLSample.dpr diff --git a/samples/ssl/SSLSample.dproj b/samples/sslserver/SSLSample.dproj similarity index 100% rename from samples/ssl/SSLSample.dproj rename to samples/sslserver/SSLSample.dproj diff --git a/samples/ssl/WebModuleUnit1.dfm b/samples/sslserver/WebModuleUnit1.dfm similarity index 100% rename from samples/ssl/WebModuleUnit1.dfm rename to samples/sslserver/WebModuleUnit1.dfm diff --git a/samples/ssl/WebModuleUnit1.pas b/samples/sslserver/WebModuleUnit1.pas similarity index 100% rename from samples/ssl/WebModuleUnit1.pas rename to samples/sslserver/WebModuleUnit1.pas diff --git a/samples/ssl/Win32/Debug/PUT OPENSSL DLLs HERE OR IN YOUR WINDOWS PATH b/samples/sslserver/Win32/Debug/PUT OPENSSL DLLs HERE OR IN YOUR WINDOWS PATH similarity index 100% rename from samples/ssl/Win32/Debug/PUT OPENSSL DLLs HERE OR IN YOUR WINDOWS PATH rename to samples/sslserver/Win32/Debug/PUT OPENSSL DLLs HERE OR IN YOUR WINDOWS PATH diff --git a/samples/wincellarclientRESTAdapter/MainFMX.fmx b/samples/wincellarclient_withrestadapter/MainFMX.fmx similarity index 100% rename from samples/wincellarclientRESTAdapter/MainFMX.fmx rename to samples/wincellarclient_withrestadapter/MainFMX.fmx diff --git a/samples/wincellarclientRESTAdapter/MainFMX.pas b/samples/wincellarclient_withrestadapter/MainFMX.pas similarity index 100% rename from samples/wincellarclientRESTAdapter/MainFMX.pas rename to samples/wincellarclient_withrestadapter/MainFMX.pas diff --git a/samples/wincellarclientRESTAdapter/ProjectGroupServerAndClient.groupproj b/samples/wincellarclient_withrestadapter/ProjectGroupServerAndClient.groupproj similarity index 100% rename from samples/wincellarclientRESTAdapter/ProjectGroupServerAndClient.groupproj rename to samples/wincellarclient_withrestadapter/ProjectGroupServerAndClient.groupproj diff --git a/samples/wincellarclientRESTAdapter/RESTServicesU.pas b/samples/wincellarclient_withrestadapter/RESTServicesU.pas similarity index 100% rename from samples/wincellarclientRESTAdapter/RESTServicesU.pas rename to samples/wincellarclient_withrestadapter/RESTServicesU.pas diff --git a/samples/wincellarclientRESTAdapter/WineCellarClientRESTAdapter.dpr b/samples/wincellarclient_withrestadapter/WineCellarClientRESTAdapter.dpr similarity index 100% rename from samples/wincellarclientRESTAdapter/WineCellarClientRESTAdapter.dpr rename to samples/wincellarclient_withrestadapter/WineCellarClientRESTAdapter.dpr diff --git a/samples/wincellarclientRESTAdapter/WineCellarClientRESTAdapter.dproj b/samples/wincellarclient_withrestadapter/WineCellarClientRESTAdapter.dproj similarity index 100% rename from samples/wincellarclientRESTAdapter/WineCellarClientRESTAdapter.dproj rename to samples/wincellarclient_withrestadapter/WineCellarClientRESTAdapter.dproj diff --git a/samples/winecellarclientlivebinding/MainFormU.dfm b/samples/winecellarclient_withlivebinding/MainFormU.dfm similarity index 100% rename from samples/winecellarclientlivebinding/MainFormU.dfm rename to samples/winecellarclient_withlivebinding/MainFormU.dfm diff --git a/samples/winecellarclientlivebinding/MainFormU.pas b/samples/winecellarclient_withlivebinding/MainFormU.pas similarity index 100% rename from samples/winecellarclientlivebinding/MainFormU.pas rename to samples/winecellarclient_withlivebinding/MainFormU.pas diff --git a/samples/winecellarclientlivebinding/ProjectGroupServerAndClient.groupproj b/samples/winecellarclient_withlivebinding/ProjectGroupServerAndClient.groupproj similarity index 100% rename from samples/winecellarclientlivebinding/ProjectGroupServerAndClient.groupproj rename to samples/winecellarclient_withlivebinding/ProjectGroupServerAndClient.groupproj diff --git a/samples/winecellarclientlivebinding/WineCellarClientLiveBinding.dpr b/samples/winecellarclient_withlivebinding/WineCellarClientLiveBinding.dpr similarity index 100% rename from samples/winecellarclientlivebinding/WineCellarClientLiveBinding.dpr rename to samples/winecellarclient_withlivebinding/WineCellarClientLiveBinding.dpr diff --git a/samples/winecellarclientlivebinding/WineCellarClientLiveBinding.dproj b/samples/winecellarclient_withlivebinding/WineCellarClientLiveBinding.dproj similarity index 100% rename from samples/winecellarclientlivebinding/WineCellarClientLiveBinding.dproj rename to samples/winecellarclient_withlivebinding/WineCellarClientLiveBinding.dproj diff --git a/samples/winecellar/MainDataModuleUnit.dfm b/samples/winecellarserver/MainDataModuleUnit.dfm similarity index 100% rename from samples/winecellar/MainDataModuleUnit.dfm rename to samples/winecellarserver/MainDataModuleUnit.dfm diff --git a/samples/winecellar/MainDataModuleUnit.pas b/samples/winecellarserver/MainDataModuleUnit.pas similarity index 100% rename from samples/winecellar/MainDataModuleUnit.pas rename to samples/winecellarserver/MainDataModuleUnit.pas diff --git a/samples/winecellar/MainWebModuleUnit.dfm b/samples/winecellarserver/MainWebModuleUnit.dfm similarity index 100% rename from samples/winecellar/MainWebModuleUnit.dfm rename to samples/winecellarserver/MainWebModuleUnit.dfm diff --git a/samples/winecellar/MainWebModuleUnit.pas b/samples/winecellarserver/MainWebModuleUnit.pas similarity index 100% rename from samples/winecellar/MainWebModuleUnit.pas rename to samples/winecellarserver/MainWebModuleUnit.pas diff --git a/samples/winecellar/WINES.FDB b/samples/winecellarserver/WINES.FDB similarity index 100% rename from samples/winecellar/WINES.FDB rename to samples/winecellarserver/WINES.FDB diff --git a/samples/winecellar/Win32/Debug/fbclient.dll b/samples/winecellarserver/Win32/Debug/fbclient.dll similarity index 100% rename from samples/winecellar/Win32/Debug/fbclient.dll rename to samples/winecellarserver/Win32/Debug/fbclient.dll diff --git a/samples/winecellar/WineCellarAppControllerU.pas b/samples/winecellarserver/WineCellarAppControllerU.pas similarity index 100% rename from samples/winecellar/WineCellarAppControllerU.pas rename to samples/winecellarserver/WineCellarAppControllerU.pas diff --git a/samples/winecellar/WineCellarServer.dpr b/samples/winecellarserver/WineCellarServer.dpr similarity index 100% rename from samples/winecellar/WineCellarServer.dpr rename to samples/winecellarserver/WineCellarServer.dpr diff --git a/samples/winecellar/WineCellarServer.dproj b/samples/winecellarserver/WineCellarServer.dproj similarity index 100% rename from samples/winecellar/WineCellarServer.dproj rename to samples/winecellarserver/WineCellarServer.dproj diff --git a/samples/winecellarserver/WineCellarServer.res b/samples/winecellarserver/WineCellarServer.res new file mode 100644 index 00000000..6876088a Binary files /dev/null and b/samples/winecellarserver/WineCellarServer.res differ diff --git a/samples/winecellar/WinesBO.pas b/samples/winecellarserver/WinesBO.pas similarity index 100% rename from samples/winecellar/WinesBO.pas rename to samples/winecellarserver/WinesBO.pas diff --git a/samples/winecellar/nbproject/private/private.xml b/samples/winecellarserver/nbproject/private/private.xml similarity index 100% rename from samples/winecellar/nbproject/private/private.xml rename to samples/winecellarserver/nbproject/private/private.xml diff --git a/samples/winecellar/nbproject/project.properties b/samples/winecellarserver/nbproject/project.properties similarity index 100% rename from samples/winecellar/nbproject/project.properties rename to samples/winecellarserver/nbproject/project.properties diff --git a/samples/winecellar/nbproject/project.xml b/samples/winecellarserver/nbproject/project.xml similarity index 100% rename from samples/winecellar/nbproject/project.xml rename to samples/winecellarserver/nbproject/project.xml diff --git a/samples/winecellar/www/css/styles.css b/samples/winecellarserver/www/css/styles.css similarity index 100% rename from samples/winecellar/www/css/styles.css rename to samples/winecellarserver/www/css/styles.css diff --git a/samples/winecellar/www/index.html b/samples/winecellarserver/www/index.html similarity index 100% rename from samples/winecellar/www/index.html rename to samples/winecellarserver/www/index.html diff --git a/samples/winecellar/www/js/jquery-1.7.1.min.js b/samples/winecellarserver/www/js/jquery-1.7.1.min.js similarity index 100% rename from samples/winecellar/www/js/jquery-1.7.1.min.js rename to samples/winecellarserver/www/js/jquery-1.7.1.min.js diff --git a/samples/winecellar/www/js/main.js b/samples/winecellarserver/www/js/main.js similarity index 100% rename from samples/winecellar/www/js/main.js rename to samples/winecellarserver/www/js/main.js diff --git a/samples/winecellar/www/pics/block_nine.jpg b/samples/winecellarserver/www/pics/block_nine.jpg similarity index 100% rename from samples/winecellar/www/pics/block_nine.jpg rename to samples/winecellarserver/www/pics/block_nine.jpg diff --git a/samples/winecellar/www/pics/bodega_lurton.jpg b/samples/winecellarserver/www/pics/bodega_lurton.jpg similarity index 100% rename from samples/winecellar/www/pics/bodega_lurton.jpg rename to samples/winecellarserver/www/pics/bodega_lurton.jpg diff --git a/samples/winecellar/www/pics/bouscat.jpg b/samples/winecellarserver/www/pics/bouscat.jpg similarity index 100% rename from samples/winecellar/www/pics/bouscat.jpg rename to samples/winecellarserver/www/pics/bouscat.jpg diff --git a/samples/winecellar/www/pics/domaine_serene.jpg b/samples/winecellarserver/www/pics/domaine_serene.jpg similarity index 100% rename from samples/winecellar/www/pics/domaine_serene.jpg rename to samples/winecellarserver/www/pics/domaine_serene.jpg diff --git a/samples/winecellar/www/pics/ex_umbris.jpg b/samples/winecellarserver/www/pics/ex_umbris.jpg similarity index 100% rename from samples/winecellar/www/pics/ex_umbris.jpg rename to samples/winecellarserver/www/pics/ex_umbris.jpg diff --git a/samples/winecellar/www/pics/generic.jpg b/samples/winecellarserver/www/pics/generic.jpg similarity index 100% rename from samples/winecellar/www/pics/generic.jpg rename to samples/winecellarserver/www/pics/generic.jpg diff --git a/samples/winecellar/www/pics/lan_rioja.jpg b/samples/winecellarserver/www/pics/lan_rioja.jpg similarity index 100% rename from samples/winecellar/www/pics/lan_rioja.jpg rename to samples/winecellarserver/www/pics/lan_rioja.jpg diff --git a/samples/winecellar/www/pics/le_doyenne.jpg b/samples/winecellarserver/www/pics/le_doyenne.jpg similarity index 100% rename from samples/winecellar/www/pics/le_doyenne.jpg rename to samples/winecellarserver/www/pics/le_doyenne.jpg diff --git a/samples/winecellar/www/pics/lurton-pinot-gris.jpg b/samples/winecellarserver/www/pics/lurton-pinot-gris.jpg similarity index 100% rename from samples/winecellar/www/pics/lurton-pinot-gris.jpg rename to samples/winecellarserver/www/pics/lurton-pinot-gris.jpg diff --git a/samples/winecellar/www/pics/margerum.jpg b/samples/winecellarserver/www/pics/margerum.jpg similarity index 100% rename from samples/winecellar/www/pics/margerum.jpg rename to samples/winecellarserver/www/pics/margerum.jpg diff --git a/samples/winecellar/www/pics/morizottes.jpg b/samples/winecellarserver/www/pics/morizottes.jpg similarity index 100% rename from samples/winecellar/www/pics/morizottes.jpg rename to samples/winecellarserver/www/pics/morizottes.jpg diff --git a/samples/winecellar/www/pics/rex_hill.jpg b/samples/winecellarserver/www/pics/rex_hill.jpg similarity index 100% rename from samples/winecellar/www/pics/rex_hill.jpg rename to samples/winecellarserver/www/pics/rex_hill.jpg diff --git a/samples/winecellar/www/pics/saint_cosme.jpg b/samples/winecellarserver/www/pics/saint_cosme.jpg similarity index 100% rename from samples/winecellar/www/pics/saint_cosme.jpg rename to samples/winecellarserver/www/pics/saint_cosme.jpg diff --git a/samples/winecellar/www/pics/viticcio.jpg b/samples/winecellarserver/www/pics/viticcio.jpg similarity index 100% rename from samples/winecellar/www/pics/viticcio.jpg rename to samples/winecellarserver/www/pics/viticcio.jpg