cmmanager/cmmgr/cmmcommon/inc/cmmserverdefs.h
branchGCC_SURGE
changeset 49 faa5ef4f80da
parent 46 95d45f234cf3
equal deleted inserted replaced
39:f10336de0cd6 49:faa5ef4f80da
    33 /**
    33 /**
    34  * CmManager server filename.
    34  * CmManager server filename.
    35  */
    35  */
    36 _LIT( KCmmServerFile, "cmmserver" );
    36 _LIT( KCmmServerFile, "cmmserver" );
    37 
    37 
    38 const TInt KCmmServerStackSize    = 0x5000; //TODO, check if really used (in common code).
       
    39 const TInt KCmmServerInitHeapSize = 0x1000; //TODO, check if really used (in common code).
       
    40 const TInt KCmmServerMaxHeapSize  = 0x1000000; //TODO, check if really used (in common code).
       
    41 
       
    42 const TInt KBitsInOneByte = 8;
    38 const TInt KBitsInOneByte = 8;
    43 const TInt KBitsInTwoBytes = 16;
    39 const TInt KBitsInTwoBytes = 16;
    44 const TInt KBitsInThreeBytes = 24;
    40 const TInt KBitsInThreeBytes = 24;
    45 
       
    46 /**
       
    47  * The server version. A version must be specified when creating a session with
       
    48  * the server.
       
    49  */
       
    50 const TUint KCmmServerMajorVersionNumber = 0; //TODO, check if really used (in common code).
       
    51 const TUint KCmmServerMinorVersionNumber = 1; //TODO, check if really used (in common code).
       
    52 const TUint KCmmServerBuildVersionNumber = 1; //TODO, check if really used (in common code).
       
    53 
    41 
    54 /**
    42 /**
    55  * Amount of time in microseconds that the server will wait before shutting
    43  * Amount of time in microseconds that the server will wait before shutting
    56  * down, after last client has gone.
    44  * down, after last client has gone.
    57  */
    45  */
    71 const TUint32 KCmmDestIdIntervalLegacyMax = 0x0100;
    59 const TUint32 KCmmDestIdIntervalLegacyMax = 0x0100;
    72 
    60 
    73 const TUint32 KCmmDestIdIntervalMin = 0x1000;
    61 const TUint32 KCmmDestIdIntervalMin = 0x1000;
    74 const TUint32 KCmmDestIdIntervalMax = 0x1100;
    62 const TUint32 KCmmDestIdIntervalMax = 0x1100;
    75 
    63 
    76 const TInt KCmmStringLengthMax = 1024; //TODO, need to find out correct value here
    64 const TInt KCmmStringLengthMax = 1024; //TODO, need to find out correct value here. 1024 is correct, but can that be received from commsdat?
    77 
    65 
    78 const TUint32 KTemporaryIdCounterStart = 32768;
    66 const TUint32 KTemporaryIdCounterStart = 32768;
    79 
    67 
    80 const TUint32 KDestProtectionLevelMask = 0xF0000000;
    68 const TUint32 KDestProtectionLevelMask = 0xF0000000;
    81 const TInt KBitsToShiftDestProtectionLevel = 28;
    69 const TInt KBitsToShiftDestProtectionLevel = 28;
    82 
    70 
    83 
    71 
    84 // Buffer size for initial connection method query
    72 // Buffer size for initial connection method query.
    85 const TInt KCmmConnMethodAmountNormal = 64; //TODO, Check value
    73 const TInt KCmmConnMethodAmountNormal = 64; //TODO, Check value
    86 // Maximum theoretical amount of connection methods
    74 // Maximum theoretical amount of connection methods.
    87 const TInt KCmmConnMethodAmountMax = 256;
    75 const TInt KCmmConnMethodAmountMax = 256;
    88 
    76 
    89 // Buffer size for initial destination query
    77 // Buffer size for initial destination query.
    90 const TInt KCmmDestAmountNormal = 32;
    78 const TInt KCmmDestAmountNormal = 32;
    91 // Maximum theoretical amount of connection methods
    79 // Maximum theoretical amount of connection methods.
    92 const TInt KCmmDestAmountMax = 256;
    80 const TInt KCmmDestAmountMax = 256;
    93 
    81 
    94 // Buffer size for supported bearers query
    82 // Buffer size for supported bearers query.
    95 const TInt KCmmBearerAmountNormal = 10;
    83 const TInt KCmmBearerAmountNormal = 10;
    96 
    84 
    97 // Buffer size for bearer priority array query, first attempt
    85 // Buffer size for bearer priority array query, first attempt.
    98 const TInt KCmmDefaultBearerPriorityArraySize = 256;
    86 const TInt KCmmDefaultBearerPriorityArraySize = 256;
    99 
    87 
   100 // iPriority:           2 16-bit values,
    88 // iPriority:           2 16-bit values,
   101 // iUIPriority:         2 16-bit values,
    89 // iUIPriority:         2 16-bit values,
   102 // iServiceType length: 1 16-bit value.
    90 // iServiceType length: 1 16-bit value.
   103 const TInt KCmmBearerPriorityHeaderLength = 5;
    91 const TInt KCmmBearerPriorityHeaderLength = 5;
   104 
    92 
   105 
    93 // Name of the icon for the 'uncategorized' group. This group is a UI-construct
   106 // Opcodes used in message passing between client and server
    94 // that is used to group all uncategorized IAPs together.
       
    95 _LIT( KCmmUncategorizedIconName, "qtg_small_favorite" );
       
    96 
       
    97 // Minimum disk space required for writing operations.
       
    98 const TInt KMinimumDiskSpace = 8192;
       
    99 
       
   100 // Opcodes used in message passing between client and server.
   107 enum TCmmRequests
   101 enum TCmmRequests
   108     {
   102     {
   109     ECmmGetBearerInfoInt                     = 0,
   103     ECmmGetBearerInfoInt                     = 0,
   110     ECmmGetBearerInfoBool                    = 1,
   104     ECmmGetBearerInfoBool                    = 1,
   111     ECmmGetBearerInfoString                  = 2,
   105     ECmmGetBearerInfoString                  = 2,
   115     ECmmGetBearerPriorityArray               = 6,
   109     ECmmGetBearerPriorityArray               = 6,
   116     ECmmGetEasyWlanId                        = 7,
   110     ECmmGetEasyWlanId                        = 7,
   117     ECmmReadDefaultConnection                = 8,
   111     ECmmReadDefaultConnection                = 8,
   118     ECmmReadGeneralConnectionSettings        = 9,
   112     ECmmReadGeneralConnectionSettings        = 9,
   119     ECmmGetSupportedBearers                  = 10,
   113     ECmmGetSupportedBearers                  = 10,
   120 
   114     ECmmGetUncategorizedIcon                 = 11,
   121     ECmmGetConnMethodInfoInt                 = 11,
   115 
   122     ECmmGetConnMethodInfoBool                = 12,
   116     ECmmGetConnMethodInfoInt                 = 12,
   123     ECmmGetConnMethodInfoString              = 13,
   117     ECmmGetConnMethodInfoBool                = 13,
   124     ECmmGetConnMethodInfoString8             = 14,
   118     ECmmGetConnMethodInfoString              = 14,
   125 
   119     ECmmGetConnMethodInfoString8             = 15,
   126     ECmmUpdateBearerPriorityArray            = 15,
   120 
   127     ECmmWriteDefaultConnection               = 16,
   121     ECmmUpdateBearerPriorityArray            = 16,
   128     ECmmWriteGeneralConnectionSettings       = 17,
   122     ECmmWriteDefaultConnection               = 17,
   129     ECmmCopyConnMethod                       = 18,
   123     ECmmWriteGeneralConnectionSettings       = 18,
   130     ECmmMoveConnMethod                       = 19,
   124     ECmmCopyConnMethod                       = 19,
   131     ECmmRemoveConnMethod                     = 20,
   125     ECmmMoveConnMethod                       = 20,
   132     ECmmRemoveAllReferences                  = 21, // Connection method becomes uncategorized.
   126     ECmmRemoveConnMethod                     = 21,
       
   127     ECmmRemoveAllReferences                  = 22, // Connection method becomes uncategorized.
   133 
   128 
   134     // RCmDestination starts from 100
   129     // RCmDestination starts from 100
   135     EDestGetDestination                      = 100,
   130     EDestGetDestination                      = 100,
   136     EDestRefresh                             = 101,
   131     EDestRefresh                             = 101,
   137     EDestCloseDestination                    = 102,
   132     EDestCloseDestination                    = 102,
   143     EDestMetadata                            = 108,
   138     EDestMetadata                            = 108,
   144     EDestGetProtectionLevel                  = 109,
   139     EDestGetProtectionLevel                  = 109,
   145     EDestIsHidden                            = 110,
   140     EDestIsHidden                            = 110,
   146     EDestIsEqual                             = 111,
   141     EDestIsEqual                             = 111,
   147     EDestGetEmbeddedDestination              = 112,
   142     EDestGetEmbeddedDestination              = 112,
   148 
   143     EDestGetIcon                             = 113,
   149     EDestCreateDestinationWithName           = 113,
   144 
   150     EDestCreateDestinationWithNameAndId      = 114,
   145     EDestCreateDestinationWithName           = 114,
   151     EDestIsConnected                         = 115,
   146     EDestCreateDestinationWithNameAndId      = 115,
   152     EDestAddConnMethod                       = 116,
   147     EDestIsConnected                         = 116,
   153     EDestAddEmbeddedDestination              = 117,
   148     EDestAddConnMethod                       = 117,
   154     EDestDeleteConnMethod                    = 118,
   149     EDestAddEmbeddedDestination              = 118,
   155     EDestRemoveConnMethod                    = 119,
   150     EDestDeleteConnMethod                    = 119,
   156     EDestModifyPriority                      = 120,
   151     EDestRemoveConnMethod                    = 120,
   157     EDestSetName                             = 121,
   152     EDestModifyPriority                      = 121,
   158     EDestSetMetadata                         = 122,
   153     EDestSetName                             = 122,
   159     EDestSetProtection                       = 123,
   154     EDestSetMetadata                         = 123,
   160     EDestSetHidden                           = 124,
   155     EDestSetProtection                       = 124,
   161     EDestUpdate                              = 125,
   156     EDestSetHidden                           = 125,
   162     EDestDelete                              = 126,
   157     EDestUpdate                              = 126,
       
   158     EDestDelete                              = 127,
       
   159     EDestSetIcon                             = 128,
   163 
   160 
   164     //RCmConnectionMethod starts from 200
   161     //RCmConnectionMethod starts from 200
   165     ECMGetConnMethodWithId                   = 200,
   162     ECMGetConnMethodWithId                   = 200,
   166     ECMRefresh                               = 201,
   163     ECMRefresh                               = 201,
   167     ECMGetConnMethodFromDestWithIndex        = 202,
   164     ECMGetConnMethodFromDestWithIndex        = 202,