policymanagement/dmutilserver/inc/DMUtilClient.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of policymanagement components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __DMUtilCLIENT_H__
       
    20 #define __DMUtilCLIENT_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <ssl.h>
       
    25 #include "DMUtilClientServer.h"
       
    26 
       
    27 // MACROS
       
    28 // DATA TYPES
       
    29 // FUNCTION PROTOTYPES
       
    30 // FORWARD DECLARATIONS
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  RDMUtil class to establish DMUtil server connection
       
    35 */
       
    36 
       
    37 class RDMUtil : public RSessionBase
       
    38 {
       
    39 	public:
       
    40 	    /**
       
    41 		* Connect Connects client side to policy engine server
       
    42 	    * @return KErrNone Symbian error code
       
    43         */
       
    44 		IMPORT_C TInt Connect();
       
    45 
       
    46 	    /**
       
    47 		* Close Close server connection
       
    48         */
       
    49 		IMPORT_C void Close();
       
    50 
       
    51 	    /**
       
    52 		* Connect Remove ACL configuration from specific ACL node in DMUtilServer
       
    53 		* @param aURI Node address
       
    54 		* @param aRestoreDefaults If true, default values are restored to ACL node (in DM client), 
       
    55 		* otherwise existing values will stay
       
    56 	    * @return KErrNone Symbian error code
       
    57         */
       
    58 		IMPORT_C TInt RemoveACL( const TDesC8& aURI, TBool aRestoreDefaults);	
       
    59 		
       
    60 	    /**
       
    61 		* Connect Add ACL to node, this is incremental operation
       
    62 		* @param aURI Node address
       
    63 		* @param aCommandType Scecific commanf type (add, get, remove...)
       
    64 	    * @return KErrNone Symbian error code
       
    65         */
       
    66         
       
    67 		IMPORT_C TInt AddACLForNode( const TDesC8& aURI, const TACLDestination& aDestination, const TAclCommands& aCommandType);	
       
    68 		
       
    69 	    /**
       
    70 		* Connect Add ACL to node, this is not incremental operation, old values are deleted
       
    71 		* @param aURI Node address
       
    72 		* @param aCommandType Scecific commanf type (add, get, remove...)
       
    73 	    * @return KErrNone Symbian error code
       
    74         */
       
    75 		IMPORT_C TInt SetACLForNode( const TDesC8& aURI, const TACLDestination& aDestination, const TAclCommands& aCommandType);	
       
    76 	
       
    77 	    /**
       
    78 		* Connect Add certificate that is used during session
       
    79 		* @param aCertInfo 
       
    80 	    * @return KErrNone Symbian error code
       
    81         */
       
    82 		IMPORT_C TInt SetMngSessionCertificate( const TCertInfo& aCertInfo);	
       
    83 
       
    84 
       
    85 	    /**
       
    86 		* Connect Connects client side to policy engine server
       
    87 		* @param aCertInfo
       
    88 		* @param aServerID
       
    89 	    * @return KErrNone Symbian error code
       
    90         */
       
    91 		IMPORT_C TInt NewDMSession( const TCertInfo& aCertInfo, const TDesC8& aServerID);
       
    92 
       
    93 	    /**
       
    94 		* Connect Flush changes to database
       
    95 	    * @return KErrNone Symbian error code
       
    96         */
       
    97 		IMPORT_C TInt Flush();
       
    98 
       
    99 		/**
       
   100 		* GetDMSessionCertInfo Gets certificate info of the current _active_ DM Session
       
   101 		* @return KErrNone Symbian error code
       
   102 		*/
       
   103 		IMPORT_C TInt GetDMSessionCertInfo( TCertInfo &aCertInfo );
       
   104 
       
   105 		/**
       
   106 		* GetDMSessionSessionId Gets server id of the current _active_ DM Session
       
   107 		* @return KErrNone Symbian error code
       
   108 		*/
       
   109 		IMPORT_C TInt GetDMSessionServerId( TDes8& aServerId );
       
   110 		
       
   111 		/**
       
   112 		* UpdatePolicyMngStatusFlags Update policy management status flags
       
   113 		* @param aPolicyMngStatusFlags
       
   114 		* @return KErrNone Symbian error code
       
   115 		*/
       
   116 		IMPORT_C TInt UpdatePolicyMngStatusFlags( KPolicyMngStatusFlags aPolicyMngStatusFlags);		
       
   117 		
       
   118 		/**
       
   119 		* PerformRFS Perform RFS operation Policy Management subsystem
       
   120 		* @return KErrNone Symbian error code
       
   121 		*/
       
   122 		IMPORT_C TInt PerformRFS();		
       
   123 		
       
   124 		/**
       
   125 		* Use this method to set a flag to perform MMC format along deep reset.
       
   126 		* This happens when the system is called for deep reset -> system boot ->
       
   127 		* PMRfsPlugin is started -> reads the flag and performs also MMC wipe.
       
   128 		*/
       
   129 		IMPORT_C TInt MarkMMCWipe();
       
   130 		
       
   131 };
       
   132 
       
   133 #endif //__DMUtilCLIENT_H__