authenticationservices/authenticationserver/test/reftestplugin/inc/pinplugindialogdefs.h
changeset 102 deec7e509f66
parent 94 0e6c5a9328b5
child 108 ca9a0fc2f082
equal deleted inserted replaced
94:0e6c5a9328b5 102:deec7e509f66
     1 /*
       
     2 * Copyright (c) 2006-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  @internalAll
       
    22  @test
       
    23 */
       
    24 
       
    25 #ifndef __PINPLUGINDIALOGDEFS_H__
       
    26 #define __PINPLUGINDIALOGDEFS_H__
       
    27 
       
    28 /** PinPlugin Dialog Notifier Uid */
       
    29 const TUid KUidPinPluginDialogNotifier = { 0x200032E6 };
       
    30 /** Pinplugin Dialog Notification for the DialogOperation */
       
    31 typedef TUint TPinPluginDialogNotification;
       
    32 
       
    33 
       
    34 /**
       
    35  Defines the operations provided by the Pin Plugin dialog. 
       
    36  It is used to identify the operation when transferring over to the notifier plugin.
       
    37  */
       
    38 enum TPinPluginDialogOperation
       
    39 	{
       
    40 	/** Displays the message about Training/Retraining/Identify process met success/failure */
       
    41 	EPinPluginInfo = 0x100,
       
    42 	/** Train/ReTrain Pin */
       
    43 	EPinPluginTraining = 0x102,
       
    44 	/** Identify Pin */
       
    45 	EPinPluginIdentify = 0x104
       
    46 	};
       
    47 	
       
    48 /** Pinplugin Dialog Operation Bit Mask */
       
    49 const TUint KPinPluginDialogOperationMask = 0xFFFF;
       
    50 
       
    51 /** 
       
    52  Pinplugin Info Message display about the result for few seconds
       
    53  without expecting the user input.
       
    54  */
       
    55 enum TPinPluginInfoMessage 
       
    56 	{
       
    57 	/** PinPlugin TrainingSuccess Message */
       
    58 	EPinPluginTrainingSuccess = 0,
       
    59 	/** PinPlugin ReTrainingSuccess Message */
       
    60 	EPinPluginReTrainingSuccess,
       
    61 	/** PinPlugin IdentificationSuccess Message */
       
    62 	EPinPluginIdentificationSuccess,
       
    63 	/** PinPlugin IdentificationFailure Message */
       
    64 	EPinPluginIdentificationFailure
       
    65 	};
       
    66 
       
    67 /** PinPlugin TrainingMessage display the process is Train/ReTrain */
       
    68 enum TPinPluginTrainingMessage
       
    69 	{
       
    70 	/** ETraining */
       
    71 	ETraining = 0x10,
       
    72 	/** EReTraining */
       
    73 	EReTraining
       
    74 	};
       
    75 	
       
    76 /** PinPlugin DialogResult used to get the result of the Dialog */
       
    77 enum TPinPluginDialogResult
       
    78 	{
       
    79 	/** Command OK */
       
    80 	EOk = 0x01,
       
    81 	/** Command CANCEL */
       
    82 	ECancel,
       
    83 	/** Command QUIT */
       
    84 	EQuit,
       
    85 	/** Command NEXT */
       
    86 	ENext
       
    87 	};
       
    88 
       
    89 /** The max Pin length should not exceed 32, because this is the maximum
       
    90  *	size possible in the CEikSecretEditor class. */
       
    91 const TInt KMaxPinLength = 32;
       
    92 
       
    93 /** A Pin value */
       
    94 typedef TBuf8<KMaxPinLength> TPinValue;
       
    95 
       
    96 
       
    97 /**  Input data for the PinIdentify */
       
    98 class TPinIdentifyInput
       
    99 	{
       
   100 public:
       
   101 	TPinPluginDialogNotification iOperation;
       
   102 
       
   103 	/** minimum pin length */
       
   104 	TInt iMinLength;
       
   105 	/** maximum pin length */
       
   106 	TInt iMaxLength;
       
   107 	/** retry true or not */
       
   108 	TBool iRetry;
       
   109 	};
       
   110 
       
   111 /** Pin IdentifyInput Buffer */
       
   112 typedef TPckgBuf<TPinIdentifyInput> TPinIdentifyInputBuf;
       
   113 
       
   114 /** Input data for the PinTraining */
       
   115 class TPinTrainingInput
       
   116 	{
       
   117 public:
       
   118 	TPinPluginDialogNotification iOperation;
       
   119 	TPinPluginTrainingMessage iMessage;
       
   120 	
       
   121 	/** minimum pin length */
       
   122 	TInt iMinLength;
       
   123 	/** maximum pin length */
       
   124 	TInt iMaxLength;
       
   125 	/** current pin length used for the pinvalues */
       
   126 	TInt iCurrentPinLength;
       
   127 	/** Random PinValue for Choice 1 */
       
   128 	TPinValue iPinValue1;
       
   129 	/** Random PinValue for Choice 2 */
       
   130 	TPinValue iPinValue2;
       
   131 	/** Random PinValue for Choice 3 */
       
   132 	TPinValue iPinValue3;
       
   133 	/** Random PinValue for Choice 4 */
       
   134 	TPinValue iPinValue4;
       
   135 	};
       
   136 
       
   137 /** Pin TrainingInput Buffer */
       
   138 typedef TPckgBuf<TPinTrainingInput> TPinTrainingInputBuf;
       
   139 
       
   140 /** Input data for the PinInfo */
       
   141 class TPinInfoInput
       
   142 	{
       
   143 public:
       
   144 	TPinPluginDialogNotification iOperation;
       
   145 	TPinPluginInfoMessage iMessage;
       
   146 	};
       
   147 
       
   148 /** The buffer holds the Message about the result of the Training/ReTraining success
       
   149     or Identification success/failure for few seconds without expecting the user input. */
       
   150 typedef TPckgBuf<TPinInfoInput> TPinInfoInputBuf;
       
   151 
       
   152 
       
   153 /** Output data for the PinIdentify, PinTraining */
       
   154 class TPinDialogOutput
       
   155 	{
       
   156 public:
       
   157 	/** iPinValue - To get the pinvalue when case is PinIdentify */
       
   158 	TPinValue iPinValue;
       
   159 	/** 
       
   160 	 iIndex - To get the index of selected pin when case is PinTraining 
       
   161 	 iIndex value should be within the range 0 - 3.
       
   162 	 */
       
   163 	TInt iIndex;
       
   164 	/** iNewPinLength - To get the new pin length for the next dialog */
       
   165 	TInt iNewPinLength; 
       
   166 	/** iResult - To get the output command when case is PinTraining / PinIdentify */
       
   167 	TPinPluginDialogResult iResult;
       
   168 	};
       
   169 
       
   170 /** The buffer holds the data for the TPinDialogOutput */
       
   171 typedef TPckgBuf<TPinDialogOutput> TPinDialogOutputBuf;
       
   172 
       
   173 
       
   174 #endif // __PINPLUGINDIALOGDEFS_H__