inc/MPEngAuthorizationStatus.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Reactive authorization status interface.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MPENGAUTHORIZATIONSTATUS_H
       
    19 #define __MPENGAUTHORIZATIONSTATUS_H
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32Std.h>
       
    24 
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MPEngAuthorizationStatusExt;
       
    28 
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * Interface for reactive authorization status.
       
    34  *
       
    35  * @since 3.0
       
    36  */
       
    37 class MPEngAuthorizationStatus
       
    38     {
       
    39     public: // Authorization statuses
       
    40 
       
    41         /**
       
    42          * Reactive authorization statuses.
       
    43          *
       
    44          * @since 3.0
       
    45          */
       
    46         enum TPEngAuthorizationStatusType
       
    47             {
       
    48             //Authorization status is undefined
       
    49             EPEngAuthUndefined      = 0x00000,
       
    50 
       
    51             //Authorization was accepted
       
    52             EPEngAuthAccepted       = 0x00001,
       
    53 
       
    54             //Authorization was denied
       
    55             EPEngAuthDenied         = 0x00002,
       
    56             };
       
    57 
       
    58 
       
    59     public: // Access to authorization status details
       
    60 
       
    61         /**
       
    62          * Identification of user.
       
    63          *
       
    64          * Gets identification of user.
       
    65          *
       
    66          * @since 3.0
       
    67          * @return Id of the requesting user.
       
    68          */
       
    69         virtual const TDesC& UserId() const = 0;
       
    70 
       
    71 
       
    72         /**
       
    73          * Status of the authorization.
       
    74          *
       
    75          * Gets the status of authorization.
       
    76          *
       
    77          * @since 3.0
       
    78          * @return Status of of the authorization.
       
    79          */
       
    80         virtual TInt AuthorizationStatus() const = 0;
       
    81 
       
    82 
       
    83         /**
       
    84          * List of authorized attributes
       
    85          *
       
    86          * Gets the list of authorized attributes.
       
    87          *
       
    88          * @since 3.0
       
    89          * @return List of authorized attributes.
       
    90          */
       
    91         virtual const RArray<TUint32>& AuthorizedAttributes() const = 0;
       
    92 
       
    93 
       
    94 
       
    95     private: //Extensions interfaces
       
    96 
       
    97         /**
       
    98          * Reactive authorization status extension interface.
       
    99          *
       
   100          * @since 3.0
       
   101          * @return Reactive authorization status extension.
       
   102          */
       
   103         virtual MPEngAuthorizationStatusExt* Extension() = 0;
       
   104         virtual const MPEngAuthorizationStatusExt* Extension() const = 0;
       
   105 
       
   106 
       
   107     protected:  //Destructor
       
   108 
       
   109         /**
       
   110          * Virtual inline destructor.
       
   111          * Protected destructor to prohibits deletion
       
   112          * through the interface.
       
   113          */
       
   114         virtual ~MPEngAuthorizationStatus() {};
       
   115 
       
   116     };
       
   117 #endif      //  __MPENGAUTHORIZATIONSTATUS_H
       
   118 
       
   119 
       
   120 //  End of File
       
   121