wlansecuritysettings/wlaneapsettingsui/EapGtc/NotifierUi/inc/GtcNotifDlgPlugin.h
branchRCL_3
changeset 19 c74b3d9f6b9e
equal deleted inserted replaced
18:bad0cc58d154 19:c74b3d9f6b9e
       
     1 /*
       
     2 * Copyright (c) 2001-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: Declaration of GtcNotifDlg Dialog Plugins
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 11.1.7 %
       
    20 */
       
    21 
       
    22 #ifndef __GTCNOTIFDLGPLUGIN_H__
       
    23 #define __GTCNOTIFDLGPLUGIN_H__
       
    24 
       
    25 
       
    26 // INCLUDES
       
    27 #include <eikdialg.h>
       
    28 #include <e32std.h>
       
    29 #include <e32base.h>
       
    30 #include <cdblen.h>
       
    31 #include <eiknotapi.h>
       
    32 #include <AknForm.h>
       
    33 #include <AknQueryDialog.h>
       
    34 #include <AknGlobalMsgQuery.h>
       
    35 #include <aknPopup.h>
       
    36 
       
    37 
       
    38 // CONSTANTS
       
    39 
       
    40 // UIDs for dialogs
       
    41 
       
    42 // ID of GTC username & password dialog
       
    43 const TUid KUidGtcDialog        = { 0x101f8e7f };
       
    44 
       
    45 // Channel used for screen   
       
    46 const TUid KScreenOutputChannel = { 0x00000123 };
       
    47 
       
    48 // Number of dialogs in this plugin
       
    49 const TInt KPluginGranularity   = 1;
       
    50 
       
    51 // ROM folder
       
    52 _LIT( KDriveZ, "z:" );
       
    53 
       
    54 // RSC file name.
       
    55 _LIT( KResourceFileName, "GtcNotifDlgUi.rsc" );
       
    56 
       
    57 
       
    58 // GLOBAL FUNCTIONS
       
    59 //
       
    60 
       
    61 /**
       
    62 * Array of connection dialog plugins.
       
    63 * @return A CArray of MEikSrvNotifierBase2 based classes.
       
    64 */
       
    65 IMPORT_C CArrayPtr< MEikSrvNotifierBase2 >* NotifierArray();
       
    66 
       
    67 
       
    68 // CLASS DECLARATION
       
    69 
       
    70 class CGTCResponseQueryDialog;
       
    71 class CGTCMessageDisplayDialog;
       
    72 
       
    73 
       
    74 struct TEapGtcUsernamePasswordInfo
       
    75     {
       
    76     TBool iIsFirstQuery;
       
    77     TBuf16<128> iIdentity;
       
    78     TBuf16<256> iPasscode;
       
    79     TPassword iPincode;
       
    80     };
       
    81 
       
    82 
       
    83 /**
       
    84  * Gtc dialog plugin class
       
    85  */
       
    86 class CGtcDialogPlugin : public CBase,
       
    87                          public MEikSrvNotifierBase2
       
    88     {
       
    89     public:
       
    90         static CGtcDialogPlugin* NewL();
       
    91 
       
    92         ~CGtcDialogPlugin();
       
    93 
       
    94         TNotifierInfo RegisterL();
       
    95         TNotifierInfo Info() const;
       
    96 
       
    97         TPtrC8 StartL( const TDesC8& aBuffer );
       
    98         void StartL( const TDesC8& aBuffer, TInt aReplySlot,
       
    99                      const RMessagePtr2& aMessage );
       
   100 
       
   101         TPtrC8 UpdateL( const TDesC8& aBuffer );
       
   102         void Cancel();
       
   103         void CompleteL( TInt aStatus );
       
   104         void Release();
       
   105         void CompleteMessageDisplayL( TInt aStatus );
       
   106 
       
   107     protected:
       
   108         CGtcDialogPlugin();
       
   109 
       
   110         void ConstructL();
       
   111         
       
   112     protected:
       
   113         TNotifierInfo iInfo;        // Notifier info
       
   114         RMessagePtr2 iMessage;      // Message
       
   115         TInt iReplySlot;            // Reply slot
       
   116         TBool iCancelled;           // ETrue if dialog cancelled. For Query dialog.	    
       
   117         TBool iGtcMessageCancelled; // ETrue if message dialog is cancelled.
       
   118 
       
   119     private:
       
   120         CGTCResponseQueryDialog* iGTCResponseQueryDlg;
       
   121         CGTCMessageDisplayDialog* iGTCMessageDisplayDlg;
       
   122 
       
   123         TEapGtcUsernamePasswordInfo* iDataPtr;
       
   124         TPckg<TEapGtcUsernamePasswordInfo>* iDataPckgPtr;
       
   125         TInt iResource;             // Resource
       
   126     };
       
   127 
       
   128 
       
   129 #endif  // __GTCNOTIFDLGPLUGIN_H__
       
   130 
       
   131 // End of File