authenticationservices/authenticationserver/inc/authserver/aspubsubdefs.h
changeset 102 deec7e509f66
parent 94 0e6c5a9328b5
child 108 ca9a0fc2f082
equal deleted inserted replaced
94:0e6c5a9328b5 102:deec7e509f66
     1 /*
       
     2 * Copyright (c) 2005-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 the License "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 * Authserver publish and subscribe properties.  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file  
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef ASPUBSUBDEFS_H
       
    27 #define ASPUBSUBDEFS_H
       
    28 
       
    29 namespace AuthServer
       
    30 {
       
    31 /**
       
    32  * Used to write to and read from the publish and subscribe property
       
    33  * KUidAuthServerLastAuth. 
       
    34  *
       
    35  * @see KUidAuthServerLastAuth
       
    36  **/
       
    37 NONSHARABLE_STRUCT(TLastAuth)
       
    38 	{
       
    39 	TLastAuth() { Mem::FillZ(this, sizeof(TLastAuth)); }
       
    40 	/// The identities id number or KUnknownIdentity
       
    41 	TIdentityId iId;
       
    42 	/// The time of the authentication, 0 if unknown 
       
    43 	TTime       iAuthTime;
       
    44 	/// The highest number of combinations of the authentication methods
       
    45 	/// used
       
    46 	TEntropy    iMaxCombinations;
       
    47 	/// the lowest false positive rate of the methods used
       
    48 	TPercentage iFalsePositiveRate;
       
    49 	/// the lowest false negative rate of the methods used
       
    50 	TPercentage iFalseNegativeRate;
       
    51 	/// the number of factors (i.e. plugins) combined to make the
       
    52 	/// authentication
       
    53 	TInt32      iNumFactors;
       
    54 	};
       
    55 
       
    56 /**
       
    57  * This is the publish and subscribe property used by the Authentication
       
    58  * Server to publish the details of the last authentication. The
       
    59  * value is of type TLastAuth and can be retrieved using code such as:
       
    60  * <code>
       
    61  * TLastAuth lastAuth;
       
    62  * TPckg<TLastAuth> authPkg(lastAuth);
       
    63  * RProperty::Get(KAuthServerSecureId, KUidAuthServerLastAuth, authPkg);
       
    64  * </code>
       
    65  *
       
    66  * The property is published each time an authentication or deauthentication
       
    67  * is made, even if the same identity is authenticated. To be notified only
       
    68  * when the identity changes, subscribe to KUidAuthServerAuthChangeEvent.
       
    69  *
       
    70  */
       
    71 const TUint KUidAuthServerLastAuth = { 0x10281843 };
       
    72 
       
    73 
       
    74 /**
       
    75  * This is the publish and subscribe property used by the Authentication
       
    76  * Server to notify subscribers of a change of authenticated identity.  The
       
    77  * published value is of type TUint and will contain the id number of the last
       
    78  * identity authenticated.
       
    79  *
       
    80  * The property is published only when the identity changes, reauthentication
       
    81  * with a different method will not result in notification.
       
    82  *
       
    83  */
       
    84 const TUint KUidAuthServerAuthChangeEvent = { 0x10281845 };
       
    85 
       
    86 }
       
    87 
       
    88 #endif /*ASPUBSUBDEFS_H*/
       
    89