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