00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00042 #ifndef __SECURECLIENTANDSERVER_H__
00043 #define __SECURECLIENTANDSERVER_H__
00044
00045 #include <e32base.h>
00046 #include <e32cons.h>
00047
00051 _LIT(KSecureServerName,"SecureServer");
00052
00053 const TUint KDefaultMessageSlots=4;
00054
00058 const TUint KSecureServMajorVersionNumber = 0;
00059 const TUint KSecureServMinorVersionNumber = 1;
00060 const TUint KSecureServBuildVersionNumber = 1;
00061
00062 IMPORT_C TInt StartThread(RThread& aServerThread);
00063
00067 enum TSecureServerRequest
00068 {
00072 ESecureServerCreateSubSession,
00076 ESecureServerCloseSubSession,
00080 ESecureServerInitSubSession,
00084 ESecureServerCloseSession,
00088 ESecureServerValue,
00092 ESecureServerResourceCount,
00096 ESecureServerIncrease,
00100 ESecureServerIncreaseBy,
00104 ESecureServerDecrease,
00108 ESecureServerDecreaseBy,
00112 ESecureServerReset,
00116 ESecureServerSaveCounter,
00120 ESecureServerSetCounterFromFile
00121 };
00122
00126 enum TSecureServerLeave
00127 {
00133 ENonNumericString = 99
00134 };
00135
00136 _LIT(KTextConsoleTitle, "Secure Server Console");
00137 _LIT(KTextFailed, " failed, leave code = %d");
00138 _LIT(KTextPressAnyKey, " [press any key]\n");
00139
00140 _LIT(KTxtTestingCountServer,"Testing the count server test with 2 client sub sessions; these represent independent counters \n\n");
00141 _LIT(KTxtInitCounterAWith,"\nInitialize counter A with : ");
00142 _LIT(KTxtInitCounterBWith,"\nInitialize counter B with : ");
00143 _LIT(KTxtInitCounterFailed,"\nSetting the counter from string failed: non-numeric character detected\n");
00144 _LIT(KTxtInitCounterSucceeded,"\nSetting the counter from string succeeded\n");
00145 _LIT(KTxtGetCounterAValue,"Getting counterA value from server: %d \n");
00146 _LIT(KTxtGetCounterBValue,"Getting counterB value from server: %d \n");
00147 _LIT(KTxtTransactionId,"***\nTransaction ID of the session : %d\n***\n");
00148 _LIT(KMsgPressAnyKey," (press any key to continue)\n");
00149 _LIT(KTxtOption,"\nEnter 1 to initialise from file\n");
00150 _LIT(KTxtInitFromFile,"\nInitialising from file, value = %d\n");
00151 _LIT(KTxtTransactionID,"\nEnter the Transaction ID for the session\n");
00152 _LIT(KTxtSaveToFile,"\nTo save the value of counter A press 'a' and for counter B press 'b'..\n");
00153 _LIT(KTxtSelectCounter,"\nYou selected counter %c\n");
00154 _LIT(KTxtSaveCounter,"\nSaving Counter Value..\n");
00155
00156 #endif