remotemgmt_plat/terminal_security_device_lock_api/inc/TerminalControl3rdPartyAPI.h
changeset 0 b497e44ab2fc
child 24 13d7c31c74e0
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2005 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: definition of dm constants/exported methods
       
    15 * 	This is part of remotemgmt_plat.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __TERMINALCONTROL3RDPARTYAPI_H__
       
    21 #define __TERMINALCONTROL3RDPARTYAPI_H__
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <TerminalControl.h>
       
    25 
       
    26 class RTerminalControl3rdPartySession : public RSubSessionBase
       
    27 	{
       
    28 	public:
       
    29 
       
    30 	    enum TTerminalControl3rdPartyMessages
       
    31 	 	    {
       
    32 	 	    // Autolock timeout. Values in minutes.  When != 0 the lock is enabled, When = 0 the lock is of
       
    33 	 	    ETimeout = 1000,        
       
    34 	 	    
       
    35 	 	    // Maximum autolock timeout value. 
       
    36 	 	    // 0 = Not in use
       
    37 	 	    EMaxTimeout,            
       
    38 	 	    // Passcode. Return value not supported
       
    39 	 	    EPasscode,              
       
    40 	 	    // 0 = passcode free. When != 0 the passcode can not be changed
       
    41 	 	    EPasscodePolicy,        
       
    42 	 	    // Lock the terminal immediately. Return value not supported
       
    43 	 	    ELock,                  
       
    44 	 	    // When != 0 the Device is wiped
       
    45 	 	    EDeviceWipe,            
       
    46 
       
    47 // enums below valid when the __SAP_DEVICE_LOCK_ENHANCEMENTS flag is on, otherwise KErrNotSupported is returned
       
    48 //#ifdef __SAP_DEVICE_LOCK_ENHANCEMENTS
       
    49 
       
    50 		    // 4-256 characters
       
    51 		    EPasscodeMinLength,		 
       
    52 		    // 4-256 characters
       
    53 		    EPasscodeMaxLength,		 
       
    54 		    // 0 = No restriction, 1 = Both upper and lower case letters 
       
    55 		    // are required in the password
       
    56 		    EPasscodeRequireUpperAndLower,	 
       
    57 		    // 0 = No restriction, 1 = Both characters and numbers are 
       
    58 		    // required in the password
       
    59 		    EPasscodeRequireCharsAndNumbers, 
       
    60 		    // 0 = No restriction, 1-4 = A single character cannot be used 
       
    61 		    // more than X times in the password	
       
    62 		    EPasscodeMaxRepeatedCharacters,  
       
    63 
       
    64 		    // 0 = No restriction, 1-X = The new password cannot match 
       
    65 		    // the previous X passwords
       
    66 		    EPasscodeHistoryBuffer,		 
       
    67 
       
    68 		    // 0 = No restriction, 1-365 = The password expires after X days, 
       
    69 		    // and must be changed by the user
       
    70 		    // -1 = password expires immediately
       
    71 		    EPasscodeExpiration,            
       
    72 
       
    73 		    // 0-HistoryBuffer = The user can change the password only X times before 
       
    74 		    // EPasscodeMinChangeInterval hours have passed (default 0).
       
    75 		    EPasscodeMinChangeTolerance,     
       
    76 		    // 0 = No restriction, 1-1000 = The user cannot change the password
       
    77 		    // more than EPasscodeMinChangeTolerance times before X hours have 
       
    78 		    // passed since the previous change.
       
    79 		    EPasscodeMinChangeInterval,      
       
    80 
       
    81 		    // 0 = No restriction, 1 = The password cannot match a string in the set of strings 
       
    82 		    // given by the next three calls.
       
    83 		    EPasscodeCheckSpecificStrings,   
       
    84 		    // Disallow the specific string/strings given.
       
    85 		    // Individual strings can be separated with ";".
       
    86 		    EPasscodeDisallowSpecific,	 
       
    87 		    // Re-allow the specific string/strings given. 
       
    88 		    // Individual strings can be separated with ";".
       
    89 		    EPasscodeAllowSpecific,          
       
    90 		    // Clear the specific string -buffer
       
    91 		    EPasscodeClearSpecificStrings,	 
       
    92 
       
    93 		    // 0 = No restriction, 3-100 = The device is "hard" reset after the user has 
       
    94 		    // consecutively failed X times to answer the password query
       
    95 		    EPasscodeMaxAttempts,		 
       
    96 		    
       
    97 		    // 0 = No restriction, 1 = The password cannot contain two consecutive numbers.	    
       
    98 	    	EPasscodeConsecutiveNumbers,
       
    99 	    	
       
   100 		    // 0 = No restriction, 1-255 = The password should contain at least 
       
   101 		    // X number of special characters.	
       
   102 		    EPasscodeMinSpecialCharacters,  
       
   103 	    	
       
   104 	    	EPasscodeDisallowSimple,
       
   105 
       
   106 //#endif
       
   107 
       
   108 	 	    ELast = 2000
       
   109 	 	    };
       
   110 
       
   111 	public:
       
   112 
       
   113 	    /**
       
   114 		* Connect Open client side session
       
   115 		* @param aServer Reference to connected RTerminalControl
       
   116 	   	* @return KErrNone Symbian error code
       
   117        	   */
       
   118 		IMPORT_C TInt Open(RTerminalControl &aServer);
       
   119 
       
   120 		/**
       
   121 		* Close Close session
       
   122    		 */
       
   123 		IMPORT_C void Close();
       
   124 
       
   125 		/**
       
   126 		SetDeviceLockParameter
       
   127 		@param aType see TTerminalControl3rdPartyMessages (documentation) for supported values
       
   128 		@param aData possible data for the message
       
   129 		@return KErrNone Symbian error code
       
   130 		*/
       
   131 
       
   132 		IMPORT_C TInt SetDeviceLockParameter(TInt aType, const TDesC8& aData);
       
   133 
       
   134 		/**
       
   135 		GetDeviceLockParameterSize
       
   136 		@param aType see TTerminalControl3rdPartyMessages (documentation) for supported values
       
   137 		@return Size of parameter bytes or KErrNone Symbian error code in case of type not exist or in case of error
       
   138 		*/
       
   139 
       
   140 		IMPORT_C TInt GetDeviceLockParameterSize(TInt aType);
       
   141 
       
   142 		/**
       
   143 		GetDeviceLockParameter
       
   144 		@param aType see TTerminalControl3rdPartyMessages (documentation) for supported values
       
   145 		@param aData returns current parameter data 
       
   146 		@return KErrNone Symbian error code
       
   147 		*/
       
   148 
       
   149 		IMPORT_C TInt GetDeviceLockParameter(TInt aType, TDes8& aData);
       
   150 
       
   151 	};
       
   152 
       
   153 #endif //__TERMINALCONTROL3RDPARTYAPI_H__