examples/Base/IPC/secureserver/secureclientandserver.h

Go to the documentation of this file.
00001 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 // Defines enums and constants that are common to the client and the server.
00015 // The most important items are:
00016 // - the enum TSecureServerRequest that defines requests. These request numbers are also known as ‘op codes’.
00017 // - the numbers that define the version of the server and the version of the server that the client requires.
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

Generated by  doxygen 1.6.2