From 3820efd644aa18590547922292968011a0ae1c83 Mon Sep 17 00:00:00 2001 From: Daniele Teti Date: Sun, 13 Nov 2016 23:51:46 +0100 Subject: [PATCH] Added mobile sample and copyright --- .../99FireMonkeySample/FMXSample.deployproj | 212 +++++ samples/99FireMonkeySample/FMXSample.dpr | 14 + samples/99FireMonkeySample/FMXSample.dproj | 863 ++++++++++++++++++ samples/99FireMonkeySample/FMXSample.res | Bin 0 -> 32 bytes samples/99FireMonkeySample/HeaderFooter.ICO | Bin 0 -> 45958 bytes samples/99FireMonkeySample/MainFormU.fmx | 67 ++ samples/99FireMonkeySample/MainFormU.pas | 61 ++ sources/Redis.Client.pas | 84 +- sources/Redis.Command.pas | 25 + sources/Redis.Commons.pas | 27 +- sources/Redis.NetLib.Factory.pas | 25 + sources/Redis.NetLib.INDY.pas | 25 + sources/Redis.Values.pas | 25 + sources/RedisMQ.pas | 25 + tests/TestRedisClientU.pas | 25 + tests/TestRedisMQ.pas | 25 + tests/TestRedisValuesU.pas | 27 +- 17 files changed, 1509 insertions(+), 21 deletions(-) create mode 100644 samples/99FireMonkeySample/FMXSample.deployproj create mode 100644 samples/99FireMonkeySample/FMXSample.dpr create mode 100644 samples/99FireMonkeySample/FMXSample.dproj create mode 100644 samples/99FireMonkeySample/FMXSample.res create mode 100644 samples/99FireMonkeySample/HeaderFooter.ICO create mode 100644 samples/99FireMonkeySample/MainFormU.fmx create mode 100644 samples/99FireMonkeySample/MainFormU.pas diff --git a/samples/99FireMonkeySample/FMXSample.deployproj b/samples/99FireMonkeySample/FMXSample.deployproj new file mode 100644 index 0000000..45d76a4 --- /dev/null +++ b/samples/99FireMonkeySample/FMXSample.deployproj @@ -0,0 +1,212 @@ + + + + 12 + + + ENU5T16126001397 + + + iPhone5 + + + + + + + + FMXSample.app\Contents\MacOS\ + libcgsqlite3.dylib + DependencyModule + 1 + + + True + + + FMXSample.app\Contents\MacOS\ + libcgunwind.1.0.dylib + DependencyModule + 1 + + + True + + + + + FMXSample\res\drawable-ldpi\ + ic_launcher.png + Android_LauncherIcon36 + 1 + + + True + + + FMXSample\ + AndroidManifest.xml + ProjectAndroidManifest + 1 + + + True + + + FMXSample\library\lib\armeabi\ + libFMXSample.so + AndroidLibnativeArmeabiFile + 1 + + + True + + + FMXSample\res\drawable-hdpi\ + ic_launcher.png + Android_LauncherIcon72 + 1 + + + True + + + FMXSample\res\drawable-xxhdpi\ + ic_launcher.png + Android_LauncherIcon144 + 1 + + + True + + + FMXSample\library\lib\armeabi-v7a\ + libFMXSample.so + ProjectOutput + 1 + + + True + True + + + FMXSample\res\drawable-small\ + splash_image.png + Android_SplashImage426 + 1 + + + True + + + FMXSample\res\drawable-normal\ + splash_image.png + Android_SplashImage470 + 1 + + + True + + + FMXSample\res\drawable-large\ + splash_image.png + Android_SplashImage640 + 1 + + + True + + + FMXSample\res\drawable-xhdpi\ + ic_launcher.png + Android_LauncherIcon96 + 1 + + + True + + + FMXSample\res\drawable-xlarge\ + splash_image.png + Android_SplashImage960 + 1 + + + True + + + FMXSample\res\drawable-mdpi\ + ic_launcher.png + Android_LauncherIcon48 + 1 + + + True + + + FMXSample\library\lib\mips\ + libFMXSample.so + AndroidLibnativeMipsFile + 1 + + + True + + + FMXSample\classes\ + classes.dex + AndroidClassesDexFile + 1 + + + True + + + FMXSample\library\lib\armeabi-v7a\ + gdbserver + AndroidGDBServer + 1 + + + True + + + FMXSample\res\drawable\ + splash_image_def.xml + AndroidSplashImageDef + 1 + + + True + + + FMXSample\res\values\ + styles.xml + AndroidSplashStyles + 1 + + + True + + + + + FMXSample.app\ + libcgunwind.1.0.dylib + DependencyModule + 1 + + + True + + + FMXSample.app\ + libPCRE.dylib + DependencyModule + 1 + + + True + + + diff --git a/samples/99FireMonkeySample/FMXSample.dpr b/samples/99FireMonkeySample/FMXSample.dpr new file mode 100644 index 0000000..0b1b51e --- /dev/null +++ b/samples/99FireMonkeySample/FMXSample.dpr @@ -0,0 +1,14 @@ +program FMXSample; + +uses + System.StartUpCopy, + FMX.Forms, + MainFormU in 'MainFormU.pas' {MainForm}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/samples/99FireMonkeySample/FMXSample.dproj b/samples/99FireMonkeySample/FMXSample.dproj new file mode 100644 index 0000000..d178fe3 --- /dev/null +++ b/samples/99FireMonkeySample/FMXSample.dproj @@ -0,0 +1,863 @@ + + + {A1E00957-BA39-49E3-9093-73504C30DB51} + 18.1 + FMX + FMXSample.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 + + + ..\..\sources\;$(DCC_UnitSearchPath) + FMXSample + $(BDS)\bin\default_app.manifest + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + $(BDS)\bin\delphi_PROJECTICON.ico + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + true + true + true + true + true + true + true + $(BDS)\bin\delphi_PROJECTICNS.icns + true + true + true + false + false + false + false + false + + + center + disabled + $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png + android-support-v4.dex.jar;apk-expansion.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_SplashImage_640x480.png + 1 + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + Base + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + fmxhrh;DBXSqliteDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;bindcomp;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DataSnapProviderClient;xmlrtl;DbxCommonDriver;IndyProtocols;bindengine;bindcompdbx;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;dbexpress;IndyIPClient;$(DCC_UsePackage);$(DCC_UsePackage) + iPhoneAndiPad + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.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_SpotlightSearchIcon_40x40.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);CFBundleResourceSpecification=ResourceRules.plist;UIDeviceFamily=iPhone & iPad;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + true + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + Base + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + fmxhrh;DBXSqliteDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;bindcomp;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DataSnapProviderClient;xmlrtl;DbxCommonDriver;IndyProtocols;bindengine;bindcompdbx;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;dbexpress;IndyIPClient;$(DCC_UsePackage);$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.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_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);CFBundleResourceSpecification=ResourceRules.plist;UIDeviceFamily=iPhone & iPad;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(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_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_750x1334.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_1242x2208.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2208x1242.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.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_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + iPhoneAndiPad + fmxhrh;bindcompfmx;DBXSqliteDriver;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;bindcomp;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DataSnapProviderClient;xmlrtl;DbxCommonDriver;IndyProtocols;dbxcds;bindengine;bindcompdbx;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;dbexpress;IndyIPClient;$(DCC_UsePackage) + true + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);CFBundleResourceSpecification=ResourceRules.plist;UIDeviceFamily=iPhone & iPad;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.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_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + + + true + fmxhrh;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapServer;DataSnapCommon;DBXInterBaseDriver;DataSnapProviderClient;DbxCommonDriver;dbxcds;fmxFireDAC;DBXOracleDriver;dsnap;IndyIPServer;fmxase;IndyCore;CloudService;IndyIPCommon;FireDACIBDriver;DataSnapFireDAC;FireDACDBXDriver;soapserver;dsnapxml;FireDACInfxDriver;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;DataSnapNativeClient;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;soaprtl;FireDAC;DBXInformixDriver;FireDACMSSQLDriver;DataSnapServerMidas;DBXFirebirdDriver;inet;fmxobj;FireDACMySQLDriver;soapmidas;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;DataSnapIndy10ServerTransport;dbexpress;IndyIPClient;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user + + + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + true + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 1033 + fmxhrh;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;vclib;DataSnapClient;DataSnapServer;DataSnapCommon;DBXInterBaseDriver;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;CloudService;DBXMSSQLDriver;IndyIPCommon;FireDACIBDriver;DataSnapFireDAC;FireDACDBXDriver;soapserver;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindcompdbx;bindengine;vclactnband;soaprtl;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VCLRESTComponents;FireDAC;DBXInformixDriver;FireDACMSSQLDriver;Intraweb;VclSmp;DataSnapConnectors;DataSnapServerMidas;DBXFirebirdDriver;dsnapcon;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;FireDACMSAccDriver;DataSnapIndy10ServerTransport;dbexpress;IndyIPClient;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + 1 + + + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);CFBundleResourceSpecification=ResourceRules.plist;UIDeviceFamily=iPhone & iPad;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + true + + + Debug + + + false + RELEASE;$(DCC_Define) + 0 + false + + + 1 + + + + MainSource + + + iPhone +
MainForm
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Application + + + + FMXSample.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 + + + + True + True + True + True + True + True + True + + + + + ic_launcher.png + true + + + + + true + + + + + libFMXSample.so + true + + + + + ic_launcher.png + true + + + + + true + + + + + ic_launcher.png + true + + + + + true + + + + + libFMXSample.so + true + + + + + splash_image.png + true + + + + + splash_image.png + true + + + + + splash_image.png + true + + + + + true + + + + + ic_launcher.png + true + + + + + splash_image.png + true + + + + + ic_launcher.png + true + + + + + true + + + + + libFMXSample.so + true + + + + + classes.dex + true + + + + + true + + + + + true + + + + + true + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + 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 + + + + + 1 + + + 1 + + + + + + + + + + + + + 12 + + + + +
diff --git a/samples/99FireMonkeySample/FMXSample.res b/samples/99FireMonkeySample/FMXSample.res new file mode 100644 index 0000000000000000000000000000000000000000..36f26e234a8ac66a47e95cec6d496cf2f1442471 GIT binary patch literal 32 UcmZQzU|>)H;{X347|28c09i@|9RL6T literal 0 HcmV?d00001 diff --git a/samples/99FireMonkeySample/HeaderFooter.ICO b/samples/99FireMonkeySample/HeaderFooter.ICO new file mode 100644 index 0000000000000000000000000000000000000000..e50f57d80cfc2a6d6bf36b6ecdff8b32ff841b96 GIT binary patch literal 45958 zcmeHQTXPi06&@R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z#3HnZ%z$TQtH67GE5P_)tH4|lE5Mo-kw9sDH9kK6 z@3UvmzLP9Y-E>_BTn1bQQpJFZ?e{-T%iuF3>!0(T(ebxjJ;YmD^N=}XM^dM4>gso$ V``gAtk?;ZNpWQ3tKGH4x{tvxfctrpJ literal 0 HcmV?d00001 diff --git a/samples/99FireMonkeySample/MainFormU.fmx b/samples/99FireMonkeySample/MainFormU.fmx new file mode 100644 index 0000000..34df9ff --- /dev/null +++ b/samples/99FireMonkeySample/MainFormU.fmx @@ -0,0 +1,67 @@ +object MainForm: TMainForm + Left = 0 + Top = 0 + Caption = 'Header Footer Form' + ClientHeight = 567 + ClientWidth = 380 + FormFactor.Width = 1440 + FormFactor.Height = 900 + FormFactor.Devices = [Desktop] + DesignerMasterStyle = 0 + object Header: TToolBar + Size.Width = 380.000000000000000000 + Size.Height = 48.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + object HeaderLabel: TLabel + Align = Contents + Size.Width = 380.000000000000000000 + Size.Height = 48.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'toollabel' + TextSettings.HorzAlign = Center + Text = 'Redis FireMonkey Mobile Sample' + end + end + object Footer: TToolBar + Align = Bottom + Position.Y = 519.000000000000000000 + Size.Width = 380.000000000000000000 + Size.Height = 48.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'bottomtoolbar' + TabOrder = 1 + end + object Button1: TButton + Align = Top + Margins.Left = 10.000000000000000000 + Margins.Top = 10.000000000000000000 + Margins.Right = 10.000000000000000000 + Margins.Bottom = 10.000000000000000000 + Position.X = 10.000000000000000000 + Position.Y = 58.000000000000000000 + Size.Width = 360.000000000000000000 + Size.Height = 55.000000000000000000 + Size.PlatformDefault = False + TabOrder = 3 + Text = 'Redis Test' + OnClick = Button1Click + end + object ListBox1: TListBox + Align = Client + Margins.Left = 10.000000000000000000 + Margins.Top = 10.000000000000000000 + Margins.Right = 10.000000000000000000 + Margins.Bottom = 10.000000000000000000 + Size.Width = 360.000000000000000000 + Size.Height = 376.000000000000000000 + Size.PlatformDefault = False + TabOrder = 4 + DisableFocusEffect = True + DefaultItemStyles.ItemStyle = '' + DefaultItemStyles.GroupHeaderStyle = '' + DefaultItemStyles.GroupFooterStyle = '' + Viewport.Width = 356.000000000000000000 + Viewport.Height = 372.000000000000000000 + end +end diff --git a/samples/99FireMonkeySample/MainFormU.pas b/samples/99FireMonkeySample/MainFormU.pas new file mode 100644 index 0000000..48313be --- /dev/null +++ b/samples/99FireMonkeySample/MainFormU.pas @@ -0,0 +1,61 @@ +unit MainFormU; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, + FMX.Controls.Presentation, + Redis.Commons, // Interfaces and types + Redis.Client, // The client itself + Redis.NetLib.INDY, // The tcp library used + Redis.Values, FMX.Edit, FMX.Layouts, FMX.ListBox; // nullable types for redis commands + +type + TMainForm = class(TForm) + Header: TToolBar; + Footer: TToolBar; + HeaderLabel: TLabel; + Button1: TButton; + ListBox1: TListBox; + procedure Button1Click(Sender: TObject); + private + procedure Log(const Value: string); + public + { Public declarations } + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.fmx} + + +procedure TMainForm.Button1Click(Sender: TObject); +var + lRedis: IRedisClient; + lValue: TRedisString; +begin + lRedis := TRedisClient.Create('192.168.1.109', 6379); + lRedis.Connect; + lRedis.&SET('firstname', 'Daniele'); + lValue := lRedis.GET('firstname'); + if not lValue.IsNull then + Log('KEY FOUND! key "firstname" => ' + lValue.Value); + Log('deleting firstname...'); + lRedis.DEL(['firstname']); // remove the key + lValue := lRedis.GET('firstname'); + if lValue.IsNull then + Log('Key "firstname" doesn''t exist (it''s correct!)') + else + Log(lValue.Value); // never printed +end; + +procedure TMainForm.Log(const Value: string); +begin + ListBox1.Items.Add(Value); +end; + +end. diff --git a/sources/Redis.Client.pas b/sources/Redis.Client.pas index a334fc7..f684e48 100644 --- a/sources/Redis.Client.pas +++ b/sources/Redis.Client.pas @@ -1,3 +1,27 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + unit Redis.Client; interface @@ -101,7 +125,8 @@ TRedisClient = class(TRedisClientBase, IRedisClient) overload; function HSET(const aKey, aField: string; aValue: TBytes): Integer; overload; - procedure HMSET(const aKey: string; aFields: TArray; AValues: TArray); + procedure HMSET(const aKey: string; aFields: TArray; aValues: TArray); overload; + procedure HMSET(const aKey: string; aFields: TArray; aValues: TArray); overload; function HMGET(const aKey: string; aFields: TArray): TRedisArray; function HGET(const aKey, aField: string; out aValue: TBytes) : boolean; overload; @@ -109,11 +134,11 @@ TRedisClient = class(TRedisClientBase, IRedisClient) : boolean; overload; function HDEL(const aKey: string; aFields: TArray): Integer; // lists - function RPUSH(const aListKey: string; AValues: array of string): Integer; - function RPUSHX(const aListKey: string; AValues: array of string): Integer; + function RPUSH(const aListKey: string; aValues: array of string): Integer; + function RPUSHX(const aListKey: string; aValues: array of string): Integer; function RPOP(const aListKey: string; var Value: string): boolean; overload; - function LPUSH(const aListKey: string; AValues: array of string): Integer; - function LPUSHX(const aListKey: string; AValues: array of string): Integer; + function LPUSH(const aListKey: string; aValues: array of string): Integer; + function LPUSHX(const aListKey: string; aValues: array of string): Integer; function LPOP(const aListKey: string; out Value: string): boolean; overload; function LRANGE(const aListKey: string; aIndexStart, aIndexStop: Integer): TRedisArray; function LLEN(const aListKey: string): Integer; @@ -167,7 +192,7 @@ TRedisClient = class(TRedisClientBase, IRedisClient) const Sorting: TRedisSorting = TRedisSorting.None; const Count: Int64 = -1): TRedisMatrix; // lua scripts - function EVAL(const AScript: string; AKeys: array of string; AValues: array of string): Integer; + function EVAL(const AScript: string; AKeys: array of string; aValues: array of string): Integer; // system procedure FLUSHDB; procedure FLUSHALL; @@ -430,7 +455,7 @@ function TRedisClient.EXPIRE(const aKey: string; end; function TRedisClient.EVAL(const AScript: string; AKeys, - AValues: array of string): Integer; + aValues: array of string): Integer; var lCmd: IRedisCommand; lParamsCount: Integer; @@ -446,7 +471,7 @@ function TRedisClient.EVAL(const AScript: string; AKeys, begin lCmd.Add(lPar); end; - for lPar in AValues do + for lPar in aValues do begin lCmd.Add(lPar); end; @@ -660,11 +685,32 @@ function TRedisClient.HMGET(const aKey: string; Result := ParseArrayResponseNULL; end; -procedure TRedisClient.HMSET(const aKey: string; aFields: TArray; AValues: TArray); +procedure TRedisClient.HMSET(const aKey: string; aFields: TArray; aValues: TArray); +var + I: Integer; +begin + if Length(aFields) <> Length(aValues) then + raise ERedisException.Create('Fields count and values count are different'); + + FNextCMD := GetCmdList('HMSET'); + FNextCMD.Add(aKey); + for I := low(aFields) to high(aFields) do + begin + FNextCMD.Add(aFields[I]); + FNextCMD.Add(aValues[I]); + end; + FTCPLibInstance.SendCmd(FNextCMD); + if FInTransaction then + CheckResponseType('QUEUED', ParseSimpleStringResponseAsStringNULL.Value) + else + CheckResponseType('OK', ParseSimpleStringResponseAsStringNULL.Value); +end; + +procedure TRedisClient.HMSET(const aKey: string; aFields: TArray; aValues: TArray); var I: Integer; begin - if Length(aFields) <> Length(AValues) then + if Length(aFields) <> Length(aValues) then raise ERedisException.Create('Fields count and values count are different'); FNextCMD := GetCmdList('HMSET'); @@ -672,7 +718,7 @@ procedure TRedisClient.HMSET(const aKey: string; aFields: TArray; AValue for I := low(aFields) to high(aFields) do begin FNextCMD.Add(aFields[I]); - FNextCMD.Add(AValues[I]); + FNextCMD.Add(aValues[I]); end; FTCPLibInstance.SendCmd(FNextCMD); if FInTransaction then @@ -751,21 +797,21 @@ function TRedisClient.LPOP(const aListKey: string): TRedisString; end; function TRedisClient.LPUSH(const aListKey: string; - AValues: array of string): Integer; + aValues: array of string): Integer; begin FNextCMD := GetCmdList('LPUSH'); FNextCMD.Add(aListKey); - FNextCMD.AddRange(AValues); + FNextCMD.AddRange(aValues); FTCPLibInstance.SendCmd(FNextCMD); Result := ParseIntegerResponse(FValidResponse); end; function TRedisClient.LPUSHX(const aListKey: string; - AValues: array of string): Integer; + aValues: array of string): Integer; begin FNextCMD := GetCmdList('LPUSHX'); FNextCMD.Add(aListKey); - FNextCMD.AddRange(AValues); + FNextCMD.AddRange(aValues); FTCPLibInstance.SendCmd(FNextCMD); Result := ParseIntegerResponse(FValidResponse); end; @@ -1201,21 +1247,21 @@ function TRedisClient.RPOPLPUSH(const ARightListKey, ALeftListKey: string; end; function TRedisClient.RPUSH(const aListKey: string; - AValues: array of string): Integer; + aValues: array of string): Integer; begin FNextCMD := GetCmdList('RPUSH'); FNextCMD.Add(aListKey); - FNextCMD.AddRange(AValues); + FNextCMD.AddRange(aValues); FTCPLibInstance.SendCmd(FNextCMD); Result := ParseIntegerResponse(FValidResponse); end; function TRedisClient.RPUSHX(const aListKey: string; - AValues: array of string): Integer; + aValues: array of string): Integer; begin FNextCMD := GetCmdList('RPUSHX'); FNextCMD.Add(aListKey); - FNextCMD.AddRange(AValues); + FNextCMD.AddRange(aValues); FTCPLibInstance.SendCmd(FNextCMD); Result := ParseIntegerResponse(FValidResponse); end; diff --git a/sources/Redis.Command.pas b/sources/Redis.Command.pas index 7464471..95b1997 100644 --- a/sources/Redis.Command.pas +++ b/sources/Redis.Command.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit Redis.Command; interface diff --git a/sources/Redis.Commons.pas b/sources/Redis.Commons.pas index 3d7e6a2..6ace240 100644 --- a/sources/Redis.Commons.pas +++ b/sources/Redis.Commons.pas @@ -1,3 +1,27 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + unit Redis.Commons; {$SCOPEDENUMS ON} @@ -95,7 +119,8 @@ TRedisClientBase = class abstract(TInterfacedObject) // hash function HSET(const aKey, aField: string; aValue: string) : Integer; overload; - procedure HMSET(const aKey: string; aFields: TArray; aValues: TArray); + procedure HMSET(const aKey: string; aFields: TArray; aValues: TArray); overload; + procedure HMSET(const aKey: string; aFields: TArray; aValues: TArray); overload; function HSET(const aKey, aField: string; aValue: TBytes): Integer; overload; function HGET(const aKey, aField: string; out aValue: TBytes): boolean; overload; function HGET(const aKey, aField: string; out aValue: string): boolean; overload; diff --git a/sources/Redis.NetLib.Factory.pas b/sources/Redis.NetLib.Factory.pas index 2188b1a..5298a29 100644 --- a/sources/Redis.NetLib.Factory.pas +++ b/sources/Redis.NetLib.Factory.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit Redis.NetLib.Factory; interface diff --git a/sources/Redis.NetLib.INDY.pas b/sources/Redis.NetLib.INDY.pas index ba3ff0d..0fc1cd5 100644 --- a/sources/Redis.NetLib.INDY.pas +++ b/sources/Redis.NetLib.INDY.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit Redis.NetLib.INDY; interface diff --git a/sources/Redis.Values.pas b/sources/Redis.Values.pas index 76f0caa..4b57c5f 100644 --- a/sources/Redis.Values.pas +++ b/sources/Redis.Values.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit Redis.Values; interface diff --git a/sources/RedisMQ.pas b/sources/RedisMQ.pas index 54bdb56..ad79ec2 100644 --- a/sources/RedisMQ.pas +++ b/sources/RedisMQ.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit RedisMQ; interface diff --git a/tests/TestRedisClientU.pas b/tests/TestRedisClientU.pas index 68a26b6..0103820 100644 --- a/tests/TestRedisClientU.pas +++ b/tests/TestRedisClientU.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit TestRedisClientU; { diff --git a/tests/TestRedisMQ.pas b/tests/TestRedisMQ.pas index 5174f84..7d7b057 100644 --- a/tests/TestRedisMQ.pas +++ b/tests/TestRedisMQ.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit TestRedisMQ; { diff --git a/tests/TestRedisValuesU.pas b/tests/TestRedisValuesU.pas index e013dc6..56d0e6e 100644 --- a/tests/TestRedisValuesU.pas +++ b/tests/TestRedisValuesU.pas @@ -1,3 +1,28 @@ +// *************************************************************************** } +// +// Delphi REDIS Client +// +// Copyright (c) 2015-2016 Daniele Teti +// +// https://github.com/danieleteti/delphiredisclient +// +// *************************************************************************** +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// *************************************************************************** + + unit TestRedisValuesU; interface @@ -5,7 +30,7 @@ interface uses TestFramework, Redis.Values, Redis.Commons; type - // Test methods for Resis Values + // Test methods for Redis Values TestRedisValues = class(TTestCase) private