connectionutilities/ConnectionDialogs/cconndlg/inc/ConnDlgPlugin.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
    13 *
    13 *
    14 * Description:  Declaration of Generic Connection Dialog Plugins
    14 * Description:  Declaration of Generic Connection Dialog Plugins
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 // NOTE that the functionality this header contains is DEPRECATED
       
    20 // None on the methods have UI functionality, the plugins complete the requests
       
    21 // immediately when they are started
       
    22 
    18 
    23 
    19 
    24 #ifndef __CONNDLGPLUGIN_H__
    20 #ifndef __CONNDLGPLUGIN_H__
    25 #define __CONNDLGPLUGIN_H__
    21 #define __CONNDLGPLUGIN_H__
    26 
    22 
    89 
    85 
    90 
    86 
    91 // FORWARD DECLARATION
    87 // FORWARD DECLARATION
    92 class CAknMultiLineDataQueryDialog;
    88 class CAknMultiLineDataQueryDialog;
    93 class CAknQueryDialog;
    89 class CAknQueryDialog;
       
    90 class CActiveCConnDlgIapPlugin;
       
    91 class CActiveSelectConnectionPlugin;
    94 
    92 
    95 // CLASS DECLARATION
    93 // CLASS DECLARATION
    96 
    94 
    97 class TAuthenticationPairBuff
    95 class TAuthenticationPairBuff
    98     {
    96     {
   111     /**
   109     /**
   112     * NewL function
   110     * NewL function
   113     * @param  -
   111     * @param  -
   114     * return CConnDlgIapPlugin*
   112     * return CConnDlgIapPlugin*
   115     */
   113     */
   116     static CConnDlgIapPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
   114     static CConnDlgIapPlugin* NewL( const TBool aResourceFileResponsible );
   117 
   115 
   118     /**
   116     /**
   119     * RegisterL register the client notifier function
   117     * RegisterL register the client notifier function
   120     * @param  -
   118     * @param  -
   121     * return TNotifierInfo
   119     * return TNotifierInfo
   147     /**
   145     /**
   148     * CompleteL the notifier is complete
   146     * CompleteL the notifier is complete
   149     * @param  aStatus status
   147     * @param  aStatus status
   150     * return  -
   148     * return  -
   151     */
   149     */
   152     void CompleteL( TInt aStatus );   
   150     void CompleteL( TInt aStatus );
       
   151     
       
   152     /**
       
   153     * Sets the preferred iap into db.
       
   154     * calls iActivePlugin    
       
   155     * @param aIAPId id of the preferred iap
       
   156     */
       
   157     void SetPreferredIapIdL( TUint32 aIAPId );
       
   158     
       
   159 private:
       
   160 
       
   161     /**
       
   162     * Gets user connection info.    
       
   163     * @param aIapId id of the iap
       
   164     */ 
       
   165     TInt GetUserConnection( TInt& aIapId );
       
   166     
       
   167     /**
       
   168     * Gets active connection info.    
       
   169     * @param aIapId id of the iap
       
   170     * @param aBearer bearer type
       
   171     */
       
   172     TInt GetActiveConnection( TInt& aIapId, TInt& aBearer );    
   153     
   173     
   154 private:
   174 private:
   155     TUint32 iIAP;                       // Internet Access Point
   175     TUint32 iIAP;                       // Internet Access Point
       
   176     TPckgBuf<TConnectionPrefs> iPrefs;  // Selected preferences
       
   177     CActiveCConnDlgIapPlugin* iActivePlugin;    // pointer to active object
   156     };
   178     };
   157 
   179 
   158 
   180 
   159 /**
   181 /**
   160  * Authentication Plugin class
   182  * Authentication Plugin class
   161  */
   183  */
   162 NONSHARABLE_CLASS( CConnDlgAuthenticationPlugin ) : 
   184 NONSHARABLE_CLASS( CConnDlgAuthenticationPlugin ) : 
   163                                             public CConnectionDialogsNotifBase
   185                                             public CConnectionDialogsNotifBase
   164     {
   186     {
   165 public:
   187 public:
   166     CConnDlgAuthenticationPlugin();
   188     CConnDlgAuthenticationPlugin::CConnDlgAuthenticationPlugin();
   167 
   189 
   168     /**
   190     /**
   169     * NewL function
   191     * NewL function
   170     * @param  -
   192     * @param  -
   171     * return CConnDlgAuthenticationPlugin*
   193     * return CConnDlgAuthenticationPlugin*
   172     */
   194     */
   173     static CConnDlgAuthenticationPlugin* NewL( 
   195     static CConnDlgAuthenticationPlugin* NewL( 
   174                                         const TBool /*aResourceFileResponsible*/ );
   196                                         const TBool aResourceFileResponsible );
   175 
   197 
   176     /**
   198     /**
   177     * RegisterL register the client notifier function
   199     * RegisterL register the client notifier function
   178     * @param  -
   200     * @param  -
   179     * return TNotifierInfo
   201     * return TNotifierInfo
   201     void Cancel();
   223     void Cancel();
   202 
   224 
   203 public:
   225 public:
   204 
   226 
   205     /**
   227     /**
       
   228     * GetAuthenticationL() show the Authenticate  dialog
       
   229     * @param  -
       
   230     * return -
       
   231     */
       
   232     void GetAuthenticationL();
       
   233 
       
   234     /**
   206     * CompleteL the notifier is complete
   235     * CompleteL the notifier is complete
   207     * @param  aStatus status
   236     * @param  aStatus status
   208     * return  -
   237     * return  -
   209     */
   238     */
   210     void CompleteL( TInt aStatus );
   239     void CompleteL( TInt aStatus );
       
   240 
       
   241 private:
       
   242     TPckgBuf<TAuthenticationPair> iAuthPair;    // Authentication pair 
       
   243                                                 // (username and password)
       
   244     TPckgBuf<TAuthenticationPairBuff> iAuthPairBuff;    // Authentication pair 
       
   245                                                 // (username and password)
       
   246     CAknMultiLineDataQueryDialog *iDialog;      // Pointer to the dialog
   211     };
   247     };
   212 
   248 
   213 
   249 
   214 /**
   250 /**
   215  * Reconnect Plugin class
   251  * Reconnect Plugin class
   223     * NewL function
   259     * NewL function
   224     * @param  -
   260     * @param  -
   225     * return CConnDlgReconnectPlugin*
   261     * return CConnDlgReconnectPlugin*
   226     */
   262     */
   227     static CConnDlgReconnectPlugin* NewL( 
   263     static CConnDlgReconnectPlugin* NewL( 
   228                                         const TBool /*aResourceFileResponsible*/ );
   264                                         const TBool aResourceFileResponsible );
   229 
   265 
   230     /**
   266     /**
   231     * RegisterL register the client notifier function
   267     * RegisterL register the client notifier function
   232     * @param  -
   268     * @param  -
   233     * return TNotifierInfo
   269     * return TNotifierInfo
   255     void Cancel();
   291     void Cancel();
   256 
   292 
   257 public:
   293 public:
   258 
   294 
   259     /**
   295     /**
       
   296     * GetReconnectL() call the reconnect dialog
       
   297     * @param  -
       
   298     * return -
       
   299     */
       
   300     void GetReconnectL();
       
   301 
       
   302     /**
   260     * CompleteL the notifier is complete
   303     * CompleteL the notifier is complete
   261     * @param  aStatus status
   304     * @param  aStatus status
   262     * return  -
   305     * return  -
   263     */
   306     */
   264     void CompleteL(TInt aStatus);
   307     void CompleteL(TInt aStatus);
       
   308 
       
   309 private:
       
   310     CAknQueryDialog* iDialog;   // Pointer to the dialog
       
   311     TBool iBool;                // Tells if it has to connect to the IAP
   265     };
   312     };
   266 
   313 
   267 
   314 
   268 /**
   315 /**
   269  * Quality of service Plugin class
   316  * Quality of service Plugin class
   275     /**
   322     /**
   276     * NewL function
   323     * NewL function
   277     * @param  -
   324     * @param  -
   278     * return CConnDlgReconnectPlugin*
   325     * return CConnDlgReconnectPlugin*
   279     */
   326     */
   280     static CConnDlgQosPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
   327     static CConnDlgQosPlugin* NewL( const TBool aResourceFileResponsible );
   281 
   328 
   282     /**
   329     /**
   283     * RegisterL register the client notifier function
   330     * RegisterL register the client notifier function
   284     * @param  -
   331     * @param  -
   285     * return TNotifierInfo
   332     * return TNotifierInfo
   307     void Cancel();
   354     void Cancel();
   308 
   355 
   309 public:
   356 public:
   310 
   357 
   311     /**
   358     /**
       
   359     * GetReconnectL() call the reconnect dialog
       
   360     * @param  -
       
   361     * return -
       
   362     */
       
   363     void GetReconnectL();
       
   364 
       
   365     /**
   312     * CompleteL the notifier is complete
   366     * CompleteL the notifier is complete
   313     * @param  aStatus status
   367     * @param  aStatus status
   314     * return  -
   368     * return  -
   315     */
   369     */
   316     void CompleteL( TInt aStatus );
   370     void CompleteL( TInt aStatus );
       
   371 
       
   372 private:
       
   373     CAknQueryDialog* iDialog;   // Pointer to the dialog
       
   374     TBool iBool;                // Tells if it has to connect to the IAP
   317     };
   375     };
   318 
   376 
   319 
   377 
   320 /**
   378 /**
   321  * New IAP Plugin class
   379  * New IAP Plugin class
   327     /**
   385     /**
   328     * NewL function
   386     * NewL function
   329     * @param  -
   387     * @param  -
   330     * return CConnDlgNewIapPlugin*
   388     * return CConnDlgNewIapPlugin*
   331     */
   389     */
   332     static CConnDlgNewIapPlugin* NewL( const TBool /*aResourceFileResponsible*/ );
   390     static CConnDlgNewIapPlugin* NewL( const TBool aResourceFileResponsible );
   333 
   391 
   334     /**
   392     /**
   335     * RegisterL register the client notifier function
   393     * RegisterL register the client notifier function
   336     * @param  -
   394     * @param  -
   337     * return TNotifierInfo
   395     * return TNotifierInfo
   359     void Cancel();
   417     void Cancel();
   360 
   418 
   361 public:
   419 public:
   362 
   420 
   363     /**
   421     /**
       
   422     * GetNewIapL show NewIap dialog
       
   423     * @param  -
       
   424     * return  -
       
   425     */
       
   426     void GetNewIapL();
       
   427 
       
   428     /**
   364     * CompleteL the notifier is complete
   429     * CompleteL the notifier is complete
   365     * @param  aStatus status
   430     * @param  aStatus status
   366     * return  -
   431     * return  -
   367     */
   432     */
   368     void CompleteL( TInt aStatus );
   433     void CompleteL( TInt aStatus );
       
   434 
       
   435 private:
       
   436     CAknQueryDialog* iDialog;                   // Pointer to the dialog
       
   437     TBool iConnect;                             // Tells if it has to connect 
       
   438                                                 // to the IAP
       
   439     TPckgBuf<TNewIapConnectionPrefs> iPrefs;    // Selected preferences
   369     };
   440     };
   370 
   441 
   371 
   442 
   372 
   443 
   373 /**
   444 /**
   381     * NewL function
   452     * NewL function
   382     * @param  -
   453     * @param  -
   383     * return CConnDlgSelectConnectionPlugin*
   454     * return CConnDlgSelectConnectionPlugin*
   384     */
   455     */
   385     static CConnDlgSelectConnectionPlugin* NewL( 
   456     static CConnDlgSelectConnectionPlugin* NewL( 
   386                                         const TBool /*aResourceFileResponsible*/ );
   457                                         const TBool aResourceFileResponsible );
   387 
   458 
   388     /**
   459     /**
   389     * RegisterL register the client notifier function
   460     * RegisterL register the client notifier function
   390     * @param  -
   461     * @param  -
   391     * return TNotifierInfo
   462     * return TNotifierInfo
   400     *                    modifiable descriptor, a TDes8 type, into which data
   471     *                    modifiable descriptor, a TDes8 type, into which data
   401     *                    can be returned. 
   472     *                    can be returned. 
   402     * @param  aMessage   Message
   473     * @param  aMessage   Message
   403     * return -
   474     * return -
   404     */
   475     */
   405     void StartL( const TDesC8& /*aBuffer*/, TInt aReplySlot, 
   476     void StartL( const TDesC8& aBuffer, TInt aReplySlot, 
   406                  const RMessagePtr2& aMessage );
   477                  const RMessagePtr2& aMessage );
   407 
   478 
   408     /**
   479     /**
   409     * Cancel() the notifier
   480     * Cancel() the notifier
   410     * @param  -
   481     * @param  -
   418     * CompleteL the notifier is complete
   489     * CompleteL the notifier is complete
   419     * @param  aStatus status
   490     * @param  aStatus status
   420     * return  -
   491     * return  -
   421     */
   492     */
   422     void CompleteL( TInt aStatus );
   493     void CompleteL( TInt aStatus );
       
   494     
       
   495     /**
       
   496     * Sets the preferred iap into db.
       
   497     * calls iActivePlugin    
       
   498     * @param aIAPId id of the preferred iap
       
   499     * @param aDestinationId id of the preferred Destination
       
   500     */
       
   501     void SetElementIDL( TUint32 aIAPId, TUint32 aDestinationId );
       
   502     
       
   503 private:
       
   504 
       
   505     /**
       
   506     * Gets user connection info.    
       
   507     * @param aIapId id of the iap
       
   508     * @param aSnapId id of the destination
       
   509     */
       
   510     TInt GetUserConnection( TInt& aIapId, TInt& aSnapId );
       
   511     
       
   512     /**
       
   513     * Gets active connection info.    
       
   514     * @param aIapId id of the iap
       
   515     * @param aSnapId id of the destination
       
   516     * @param aBearer bearer type
       
   517     */    
       
   518     TInt GetActiveConnection( TInt& aIapId, TInt& aSnapId, TInt& aBearer );
   423 
   519 
   424 private:
   520 private:
   425     TUint32 iElementID;
   521     TUint32 iElementID;
       
   522     TPckgBuf<TConnectionPrefs> iPrefs;  // Selected preferences
       
   523     CActiveSelectConnectionPlugin* iActivePlugin;   // pointer to active object
   426     };
   524     };
   427 
   525 
   428 #endif
   526 #endif
   429 
   527 
   430 // End of File
   528 // End of File