How to connect to the security manager

To use the security manager, a client must:

  1. Create a session to the security manager, RBTMan , and open a connection.

  2. Create a subsession to the security manager, RBTSecuritySettings , and open it. A client can have multiple subsessions open if required. (Sessions and subsessions are part of Symbian platform's architecture for interprocess communication: see Client/Server Overview ).

  3. Close subsessions and sessions when they are no longer needed.

Example

The following example shows how to connect to the security manager:

      
       
      
      // 1. Create and open session to the security manager
RBTMan secMan;
User::LeaveIfError(secMan.Connect());

// 2. Create and open a subsession
RBTSecuritySettings secmanSubSession;
User::LeaveIfError(secmanSubSession.Open(secMan));

...
// 3. Cleanup
secmanSubSession.Close();
secMan.Close();