00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #ifndef __SECURECLIENTANDSERVER_H__
00028 #define __SECURECLIENTANDSERVER_H__
00029
00030 #include <e32base.h>
00031 #include <e32cons.h>
00032
00036 _LIT(KSecureServerName,"SecureServer");
00037
00038 const TUint KDefaultMessageSlots=4;
00039
00043 const TUint KSecureServMajorVersionNumber = 0;
00044 const TUint KSecureServMinorVersionNumber = 1;
00045 const TUint KSecureServBuildVersionNumber = 1;
00046
00047 IMPORT_C TInt StartThread(RThread& aServerThread);
00048
00052 enum TSecureServerRequest
00053 {
00057 ESecureServerCreateSubSession,
00061 ESecureServerCloseSubSession,
00065 ESecureServerInitSubSession,
00069 ESecureServerCloseSession,
00073 ESecureServerValue,
00077 ESecureServerResourceCount,
00081 ESecureServerIncrease,
00085 ESecureServerIncreaseBy,
00089 ESecureServerDecrease,
00093 ESecureServerDecreaseBy,
00097 ESecureServerReset,
00101 ESecureServerSaveCounter,
00105 ESecureServerSetCounterFromFile
00106 };
00107
00111 enum TSecureServerLeave
00112 {
00118 ENonNumericString = 99
00119 };
00120
00121 _LIT(KTextConsoleTitle, "Secure Server Console");
00122 _LIT(KTextFailed, " failed, leave code = %d");
00123 _LIT(KTextPressAnyKey, " [press any key]\n");
00124
00125 _LIT(KTxtTestingCountServer,"Testing the count server test with 2 client sub sessions; these represent independent counters \n\n");
00126 _LIT(KTxtInitCounterAWith,"\nInitialize counter A with : ");
00127 _LIT(KTxtInitCounterBWith,"\nInitialize counter B with : ");
00128 _LIT(KTxtInitCounterFailed,"\nSetting the counter from string failed: non-numeric character detected\n");
00129 _LIT(KTxtInitCounterSucceeded,"\nSetting the counter from string succeeded\n");
00130 _LIT(KTxtGetCounterAValue,"Getting counterA value from server: %d \n");
00131 _LIT(KTxtGetCounterBValue,"Getting counterB value from server: %d \n");
00132 _LIT(KTxtTransactionId,"***\nTransaction ID of the session : %d\n***\n");
00133 _LIT(KMsgPressAnyKey," (press any key to continue)\n");
00134 _LIT(KTxtOption,"\nEnter 1 to initialise from file\n");
00135 _LIT(KTxtInitFromFile,"\nInitialising from file, value = %d\n");
00136 _LIT(KTxtTransactionID,"\nEnter the Transaction ID for the session\n");
00137 _LIT(KTxtSaveToFile,"\nTo save the value of counter A press 'a' and for counter B press 'b'..\n");
00138 _LIT(KTxtSelectCounter,"\nYou selected counter %c\n");
00139 _LIT(KTxtSaveCounter,"\nSaving Counter Value..\n");
00140
00141 #endif