os/security/authorisation/userpromptservice/test/include/tupsproperty.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2007-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 *
    16 */
    17 
    18 
    19 /**
    20  @file  
    21  @test
    22 */
    23 
    24 #ifndef UPSPROPERTY_H
    25 #define UPSPROPERTY_H
    26 
    27 // interval between instances of either a PE or a DC. This value is added to the indexes below
    28 static const TInt KInstanceInterval = 100;
    29 
    30 // policy evaluator indexes
    31 static const TInt KPe_Start = 0;
    32 static const TInt KPe_Status = 1;
    33 static const TInt KPe_RunningInstance = 2;
    34 static const TInt KPe_ClientSid = 3;
    35 static const TInt KPe_ServerSid = 4;
    36 static const TInt KPe_Leave = 5;
    37 static const TInt KPe_Error = 6;
    38 static const TInt KPe_ServiceId = 7;
    39 static const TInt KPe_ForcePrompt = 8;
    40 static const TInt KPe_EvaluatorInfo = 9;
    41 static const TInt KPe_HoldEvaluatorOpen = 10;
    42 
    43 // dialog creator indexes
    44 static const TInt KDc_Start = 50;
    45 static const TInt KDc_Status = 1;
    46 static const TInt KDc_RunningInstance = 2;
    47 static const TInt KDc_ClientSid = 3;
    48 static const TInt KDc_ServerSid = 4;
    49 static const TInt KDc_Leave = 5;
    50 static const TInt KDc_Error = 6;
    51 static const TInt KDc_ServiceId = 7;
    52 static const TInt KDc_UpsRequestedButtons = 20;
    53 static const TInt KDc_WhichButtonToPress = 21;
    54 static const TInt KDc_HoldPrepareDialogOpen = 22;
    55 static const TInt KDc_HoldDisplayDialogOpen = 23;
    56 static const TInt KDc_SelectFingerprint = 24;
    57 
    58 static const TInt32 KPropertyCreator=0x101F7784; 
    59 static const TUid KPropertyCreatorUid={KPropertyCreator};
    60 
    61 class CUpsProperty : public CBase
    62 	{
    63 public:
    64 	enum TType
    65 	{
    66 		EPolicyEvaluator,
    67 		EDialogCreator
    68 	};
    69 
    70 	static CUpsProperty* NewL(const TUid& aCategory);
    71 	virtual ~CUpsProperty() {};
    72 
    73 	void GetL(TInt aInstanceNumber, TInt aPropertyKey, TType aType, TInt& aValue);
    74 	void GetL(TInt aInstanceNumber, TInt aPropertyKey, TType aType, TDes& aValue);
    75 	void SetL(TInt aInstanceNumber, TInt aPropertyKey, TType aType, TInt aValue);
    76 	void SetL(TInt aInstanceNumber, TInt aPropertyKey, TType aType, TDes& aValue);
    77 
    78 	TInt GetPropertyKey(TInt aPropertyKey, TInt aStart, TInt aInterval, TInt aInstanceNumber);
    79 
    80 protected:
    81 	TUid iCategory;
    82 
    83 private:
    84 	CUpsProperty(const TUid& aCategory);
    85 	};
    86 
    87 
    88 #endif