javacommons/comms/inc/commspermissions.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 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:  CommsPermissions
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef COMMSPERMISSIONS_H
       
    19 #define COMMSPERMISSIONS_H
       
    20 
       
    21 namespace java
       
    22 {
       
    23 namespace comms
       
    24 {
       
    25 
       
    26 /**
       
    27 * CommsPermission enumeration defines the set of supported permissions.
       
    28 * CommsPermission constants are used to hide platform specific permission model.
       
    29 *
       
    30 * CommsPermission mapping to Symbian capability model is listed below:
       
    31 * CommsPermission         TCapability
       
    32 *   MANAGE_CERTIFICATES     ECapabilityWriteDeviceData
       
    33 *   INSTALL_APPLICATION     ECapabilityTrustedUI
       
    34 *   LAUNCH_APPLICATION      ECapabilityNetworkControl
       
    35 *   STOP_APPLICATION        ECapabilityPowerMgmt
       
    36 *
       
    37 * @code
       
    38 * MyListener::processMessage(CommsMessage& aMessage)
       
    39 * {
       
    40 *     if( aMessage.hasPermission(MANAGE_CERTIFICATES) )
       
    41 *     {
       
    42 *         // manage certificates
       
    43 *     }
       
    44 * }
       
    45 * @endcode
       
    46 *
       
    47 * @see CommsMessage
       
    48 */
       
    49 
       
    50 enum CommsPermission
       
    51 {
       
    52     MANAGE_CERTIFICATES = 1,
       
    53     INSTALL_APPLICATION = 2,
       
    54     LAUNCH_APPLICATION = 4,
       
    55     STOP_APPLICATION = 8,
       
    56 };
       
    57 
       
    58 
       
    59 } // namespace comms
       
    60 } // namespace java
       
    61 
       
    62 #endif // COMMSPERMISSIONS_H