remotemgmt_plat/scp_server_api/inc/SCPServerInterface.h
changeset 0 b497e44ab2fc
child 13 86979fe66c4c
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: 
       
    15 *       Contains the definitions needed for communication with the SCP server.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef SCPSERVER_INTEFFACE_H
       
    22 #define SCPSERVER_INTEFFACE_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "SCPPServerPluginDefs.hrh"
       
    26 
       
    27 typedef TBuf<8> TSCPSecCode;
       
    28 const TInt KSCPMaxEnhCodeLen = 256;
       
    29 
       
    30 
       
    31 // LOCAL CONSTANTS
       
    32 _LIT( KSCPServerName, "!SCPServer" );
       
    33 _LIT( KSCPServerFileName, "SCPServer" );
       
    34 _LIT( KSCPServerSemaphoreName, "SCPServerSem" );
       
    35 
       
    36 // The available functions
       
    37 enum TSCPServRqst 
       
    38 	{
       
    39 	ESCPServGetCode = 0,
       
    40 	ESCPServChangeCode,
       
    41 	ESCPServSetPhoneLock,
       
    42 	ESCPServGetLockState,
       
    43 	ESCPServSetParam,
       
    44 	ESCPServSetCode = 10,
       
    45 	ESCPServQueryAdminCmd = 20,
       
    46 	ESCPServGetParam = 30,
       
    47 	ESCPServAuthenticateS60 = 40,
       
    48 	ESCPServChangeEnhCode,
       
    49 	ESCPServCodeChangeQuery,
       
    50 	ESCPServCheckConfig = 50,
       
    51 	ESCPApplicationUninstalled = 60,
       
    52 	ESCPServUISetAutoLock = 70
       
    53 	};
       
    54 
       
    55 // The admin commands that can be queried for
       
    56 enum TSCPAdminCommand
       
    57     {
       
    58     ESCPCommandLockPhone,
       
    59     ESCPCommandUnlockPhone
       
    60     };
       
    61 
       
    62 // The parameters available from the server
       
    63 enum TSCPParameterID
       
    64     {
       
    65     ESCPAutolockPeriod,
       
    66     ESCPMaxAutolockPeriod,
       
    67     ESCPCodeChangePolicy
       
    68     };
       
    69 
       
    70 // The version number of this client-server package
       
    71 const TUint KSCPServMajorVersionNumber=0;
       
    72 const TUint KSCPServMinorVersionNumber=9;
       
    73 const TUint KSCPServBuildVersionNumber=0;
       
    74 
       
    75 // Absolute minimum and maximum lengths of the passcode
       
    76 const TInt KSCPPasscodeMinLength = 4;
       
    77 const TInt KSCPPasscodeMaxLength = 255;
       
    78 
       
    79 // Max text length of a TInt (-1*2^31)
       
    80 const TInt KSCPMaxIntLength( 11 );
       
    81 // Max text length of a TUInt64 (2^64)
       
    82 const TInt KSCPMaxInt64Length( 21 );
       
    83 
       
    84 // Max buffer length for an MD5 digest
       
    85 const TInt KSCPMaxHashLength( 32 );
       
    86 // MD5 digest length
       
    87 const TInt KSCPMD5HashLen( 16 ); // 128 bits
       
    88 
       
    89 // Max ISA code length
       
    90 const TInt KSCPCodeMaxLen( 5 );
       
    91 
       
    92 // Default parameters
       
    93 _LIT( KSCPDefaultSecCode, "12345" );
       
    94 _LIT( KSCPDefaultEnchSecCode, "12345" );
       
    95 
       
    96 // Lengths for the TARM notifier param buffer
       
    97 const TInt KSCPTARMSuffixLen = 4;
       
    98 const TInt KSCPMaxTARMNotifParamLen = KSCPTARMSuffixLen + 512; 
       
    99 // 512 chars through the event and 4 for the prefix
       
   100 
       
   101 // Max length for the prompts for UI actions
       
   102 const TInt KSCPMaxPromptTextLen = 100; 
       
   103 
       
   104 // New Tarm event
       
   105 const TUint KSCPTARMSecEvent = SCP_TARM_SEC_EVENT_UID;
       
   106 const TUint KSCPTARMSecEventReply = SCP_TARM_SEC_EVENT_REP_UID;
       
   107 const TUid KSecUIDObserver   = {SCP_SECOBS_UID};
       
   108 
       
   109 // The interface UID for SCP interest objects
       
   110 const TUid KSCPPluginInterfaceUID = { SCP_PLUGIN_IF_UID };
       
   111 
       
   112 // SCP server UID
       
   113 const TUid KSCPServerUid = { SCP_SERVER_UID };
       
   114 
       
   115 // Autolock's SID
       
   116 const TUid KSCPSIDAutolock = {0x100059B5};
       
   117 
       
   118 // Values for TARM admin flag
       
   119 const TInt KSCPFlagResyncQuery = 1; // For SecUi to show the correct query when out-of-sync
       
   120 const TInt KSCPFlagAdminLock = 2; // For Autolock to lock the phone also when in a call
       
   121 const TInt KSCPConfigCheckTimeout = 500000; // 0.5s
       
   122 
       
   123 // Code query flags
       
   124 const TInt KSCPEtelRequest = 1;
       
   125 
       
   126 // Parameters for checking the configuration in CheckConfiguration call
       
   127 const TInt KSCPInitial = 1;
       
   128 const TInt KSCPComplete = 2;
       
   129 
       
   130 #endif      // SCPSERVER_INTEFFACE_H   
       
   131             
       
   132 // End of File
       
   133