examples/Base/IPC/secureserver/secureclientandserver.h File Reference

Go to the source code of this file.

Enumerations

enum  TSecureServerRequest {
  ESecureServerCreateSubSession, ESecureServerCloseSubSession, ESecureServerInitSubSession, ESecureServerCloseSession,
  ESecureServerValue, ESecureServerResourceCount, ESecureServerIncrease, ESecureServerIncreaseBy,
  ESecureServerDecrease, ESecureServerDecreaseBy, ESecureServerReset, ESecureServerSaveCounter,
  ESecureServerSetCounterFromFile
}
enum  TSecureServerLeave { ENonNumericString = 99 }

Functions

 _LIT (KSecureServerName,"SecureServer")
IMPORT_C TInt StartThread (RThread &aServerThread)
 _LIT (KTextConsoleTitle,"Secure Server Console")
 _LIT (KTextFailed," failed, leave code = %d")
 _LIT (KTextPressAnyKey," [press any key]\n")
 _LIT (KTxtTestingCountServer,"Testing the count server test with 2 client sub sessions; these represent independent counters \n\n")
 _LIT (KTxtInitCounterAWith,"\nInitialize counter A with : ")
 _LIT (KTxtInitCounterBWith,"\nInitialize counter B with : ")
 _LIT (KTxtInitCounterFailed,"\nSetting the counter from string failed: non-numeric character detected\n")
 _LIT (KTxtInitCounterSucceeded,"\nSetting the counter from string succeeded\n")
 _LIT (KTxtGetCounterAValue,"Getting counterA value from server: %d \n")
 _LIT (KTxtGetCounterBValue,"Getting counterB value from server: %d \n")
 _LIT (KTxtTransactionId,"***\nTransaction ID of the session : %d\n***\n")
 _LIT (KMsgPressAnyKey," (press any key to continue)\n")
 _LIT (KTxtOption,"\nEnter 1 to initialise from file\n")
 _LIT (KTxtInitFromFile,"\nInitialising from file, value = %d\n")
 _LIT (KTxtTransactionID,"\nEnter the Transaction ID for the session\n")
 _LIT (KTxtSaveToFile,"\nTo save the value of counter A press 'a' and for counter B press 'b'..\n")
 _LIT (KTxtSelectCounter,"\nYou selected counter %c\n")
 _LIT (KTxtSaveCounter,"\nSaving Counter Value..\n")

Variables

const TUint KDefaultMessageSlots = 4
const TUint KSecureServMajorVersionNumber = 0
const TUint KSecureServMinorVersionNumber = 1
const TUint KSecureServBuildVersionNumber = 1

Detailed Description

See also:
RSecureSubSession

Definition in file secureclientandserver.h.


Enumeration Type Documentation

Op codes supported by the server.

Enumerator:
ESecureServerCreateSubSession 

Op code to create a subsession.

ESecureServerCloseSubSession 

Op code to close a subsession.

ESecureServerInitSubSession 

Op code to initialise the counter of the subsession.

ESecureServerCloseSession 

Op code to close a session.

ESecureServerValue 

Op code to get the counter value from the server.

ESecureServerResourceCount 

Op code to get the resource count from the server.

ESecureServerIncrease 

Op code to increase the counter value by one.

ESecureServerIncreaseBy 

Op code to increase the counter value by a value greater than one.

ESecureServerDecrease 

Op code to decrease the counter value by one.

ESecureServerDecreaseBy 

Op code to increase the counter value by a value greater than one.

ESecureServerReset 

Op code to reset the counter to default value.

ESecureServerSaveCounter 

Op code to save the counter value to the counter.dat file.

ESecureServerSetCounterFromFile 

Op code to set the counter value from the counter.dat file.

Definition at line 67 of file secureclientandserver.h.

Defines the leave code of the server.

Enumerator:
ENonNumericString 

Leave code if the string that sets the counter contains non-numeric characters. For example, the string "ab" is invalid and "10" is valid.

See also:
CSecureServerSubSession::SetFromStringL

Definition at line 126 of file secureclientandserver.h.


Function Documentation

_LIT ( KSecureServerName  ,
"SecureServer"   
)

Name of the server.

IMPORT_C TInt StartThread ( RThread &  aServerThread  ) 

Create the thread that will act as the server. This function is exported from the DLL and called by the client.

Note that a server can also be implemented as a separate executable (i.e. as a separate process).

Creates the server thread. If the server is not running, the function starts the server thread. The function CSecureServer::ThreadFunction() contains the code that is called when the server thread starts.

Parameters:
aServerThread The handle to the server thread.
Returns:
KErrNone if successful, or an error code returned by RThread::Create().
See also:
CSecureServer::ThreadFunction()

Definition at line 99 of file ComplexServer.cpp.


Variable Documentation

Version numbers of the server.

Definition at line 58 of file secureclientandserver.h.


Generated by  doxygen 1.6.2