bearermanagement/mpm/inc/mpmcommon.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004-2009 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: This header defines common definitions for MPM
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19 @file mpmcommon.h
       
    20 Mobility Policy Manager common definitions.
       
    21 */
       
    22 
       
    23 #ifndef MPMCOMMON_H
       
    24 #define MPMCOMMON_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 // CONSTANTS
       
    30 // Server name
       
    31 _LIT( KMPMServerName,"!MPMServer" );
       
    32 // MPM Default Connection server name
       
    33 _LIT( KMPMDefaultConnectionServerName,"!MPMDefaultConnectionServer" );
       
    34 
       
    35 // EXE name
       
    36 _LIT( KMPMServerImg,"MPMServer" );
       
    37 
       
    38 const TUid KServerUid2={0x1000008d};
       
    39 const TUid KServerUid3={0x101f6d12};
       
    40 
       
    41 const TInt KMPMServerStackSize    = 0x2000;    //  8KB
       
    42 const TInt KMPMServerInitHeapSize = 0x1000;    //  4KB
       
    43 const TInt KMPMServerMaxHeapSize  = 0x1000000; // 16MB
       
    44 
       
    45 // The server version. A version must be specified when 
       
    46 // creating a session with the server
       
    47 const TUint KMPMServerMajorVersionNumber = 5;
       
    48 const TUint KMPMServerMinorVersionNumber = 2;
       
    49 const TUint KMPMServerBuildVersionNumber = 0;
       
    50 
       
    51 // The number of message slots allocated for a client session
       
    52 // Number of necessary message slots is determined as follows. 
       
    53 // If these conditions change number of message slots may need to be increased. 
       
    54 // 3 for asyncronous methods (ChooseBestIAP, ProcessError, WaitNotification)
       
    55 // 1 for cancelling asynchronous requests
       
    56 // 5 for synchronous requests. Following functions use Send and could 
       
    57 // theoretically be called before previous syncronous call has completed: 
       
    58 //
       
    59 // ApplicationLeavesConnection, UnregisterPrefIAPNotif, 
       
    60 // IAPConnectionActivated, ApplicationMigratesToCarrier,
       
    61 //  
       
    62 // and one of following (These use SendReceive):
       
    63 // RegisterPrefIAPNotif, ApplicationIgnoredTheCarrier, 
       
    64 // ApplicationAcceptedTheCarrier, ApplicationRejectedTheCarrier, 
       
    65 // ApplicationConnectionEnds, SortSNAP, ApplicationJoinsConnection, 
       
    66 // IAPConnectionStopped, IAPConnectionStarted, EasyWlanSsid
       
    67 //
       
    68 const TUint KNumMessageSlots = 9;
       
    69 
       
    70 // The number of message slots allocated for MPM Default Connection 
       
    71 // client session
       
    72 const TUint KNumDefConnMessageSlots = 1;
       
    73 
       
    74 // MACROS
       
    75 
       
    76 // DATA TYPES
       
    77 // Opcodes used in message passing between client and server
       
    78 enum TMPMServerRequests
       
    79     {
       
    80     EMPMServerChooseIap,
       
    81     EMPMServerCancelRequest,
       
    82     EMPMServerApplicationLeavesConnection,
       
    83     EMPMServerIapConnectionStopped,
       
    84     EMPMServerProcessError,
       
    85     EMPMServerRegisterPrefIAPNotif,
       
    86     EMPMServerUnregisterPrefIAPNotif,
       
    87     EMPMServerWaitNotification, 
       
    88     EMPMServerSortSNAP,
       
    89     EMPMServerApplicationJoinsConnection,
       
    90     EMPMServerIapConnectionActivated, 
       
    91     EMPMServerIapConnectionStarted, 
       
    92     EMPMServerApplicationConnectionEnds, 
       
    93     EMPMServerApplicationMigratesToCarrier, 
       
    94     EMPMServerApplicationIgnoredTheCarrier, 
       
    95     EMPMServerApplicationAcceptedTheCarrier, 
       
    96     EMPMServerApplicationRejectedTheCarrier, 
       
    97     EMPMServerEasyWlanSsid,
       
    98     EMPMServerReselectIap
       
    99     };
       
   100 
       
   101 /**  Request codes for MPM Default Connection server */
       
   102 enum TMPMDefaultConnectionRequests
       
   103     {
       
   104     EMPMDefaultConnectionSetDefaultIap,
       
   105     EMPMDefaultConnectionClearDefaultIap
       
   106     };
       
   107 
       
   108 // Panic codes used for server and client
       
   109 // Code values selected just for being different
       
   110 // than some normal common error or return values. 
       
   111 enum TMPMPanic
       
   112     {
       
   113     // Server
       
   114     EMPMReceiveAlreadyActive     = 100,
       
   115     
       
   116     // Client
       
   117     ERMPMPanicClientNotConnected = 150    
       
   118     };
       
   119       
       
   120 #endif // MPMCOMMON_H
       
   121 
       
   122 // End of File