epoc32/include/agentdialog.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 /**
       
     2 * Copyright (c) 1997-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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Generic Connection Dialog Client
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @file AGENTDIALOG.H
       
    26  @internalTechnology
       
    27 */
       
    28 
       
    29 #ifndef __AGENTDIALOG_H__
       
    30 #define __AGENTDIALOG_H__
       
    31 
       
    32 #include <e32std.h>
       
    33 #include <cdbcols.h>
       
    34 #include <cdblen.h>
       
    35 //#include <comms-infras/commsdebugutility.h> Cannot be included because it conflicts with flogger
       
    36 
       
    37 
       
    38 /**
       
    39 Server name in EKA2 case
       
    40 @internalTechnology
       
    41 */
       
    42 _LIT(KCommsDialogServerName, "!NetDialDialogServer");
       
    43 
       
    44 //__FLOG_STMT(_LIT8(KDlgSvrLogSubsys, "agentdialog");)
       
    45 //__FLOG_STMT(_LIT8(KDlgSvrLogComponent, "server");)
       
    46 //__FLOG_STMT(_LIT8(KDlgCliLogComponent, "client");)
       
    47 
       
    48 class TConnectionPrefs
       
    49 /**
       
    50 Specifies the rank and desired direction of the connection and bearer.
       
    51 
       
    52 @internalTechnology
       
    53 */
       
    54 	{
       
    55 public:
       
    56 	TUint32 iRank;
       
    57 	TCommDbConnectionDirection iDirection;
       
    58 	TUint32 iBearerSet;
       
    59 	};
       
    60 
       
    61 class TIspConnectionNames
       
    62 /**
       
    63 Specifies the Connection Names for ISP.
       
    64 
       
    65 @internalTechnology
       
    66 */
       
    67 	{
       
    68 public:
       
    69 	TBuf<KCommsDbSvrDefaultTextFieldLength> iServiceName;
       
    70 	TBuf<KCommsDbSvrMaxColumnNameLength> iServiceTable;
       
    71 	TBuf<KCommsDbSvrDefaultTextFieldLength> iModemName;
       
    72 	TBuf<KCommsDbSvrDefaultTextFieldLength> iLocationName;
       
    73 	TBuf<KCommsDbSvrDefaultTextFieldLength> iChargecardName;
       
    74 	};
       
    75 
       
    76 class TAuthenticationPair
       
    77 /**
       
    78 Specifies the Authentication for the User Name and Password.
       
    79 
       
    80 @internalTechnology
       
    81 */
       
    82 	{
       
    83 public:
       
    84 	TDes* iUsername;
       
    85 	TDes* iPassword;
       
    86 	};
       
    87 
       
    88 class TPctResponse
       
    89 /**
       
    90 Allows the user to see the login script running, see what is sent and received, and allows the user to type responses.
       
    91 
       
    92 @internalTechnology
       
    93 */
       
    94 	{
       
    95 public:
       
    96 	TDes* iBuffer;
       
    97 	};
       
    98 
       
    99 class TNewIapConnectionPrefs
       
   100 /**
       
   101 Specifies Connection Preference for the New IAP.
       
   102 
       
   103 @internalTechnology
       
   104 */
       
   105 	{
       
   106 public:
       
   107 	TConnectionPrefs iPrefs;
       
   108 	TInt iLastError;
       
   109 	TBuf<KCommsDbSvrDefaultTextFieldLength> iName;
       
   110 	};
       
   111 
       
   112 class RDialogNotifier : public RNotifier
       
   113 /**
       
   114 Client interface to allow engines or other low level components to communicate with the UI.
       
   115 
       
   116 Real implementations need three asynchronous message slots instead of RNotifiers default one slot
       
   117 in order to implement the PCT functionality.  This is not used at all by the test dialog server
       
   118 implementation.
       
   119  
       
   120 @internalTechnology
       
   121 */
       
   122 	{
       
   123 public :
       
   124 	TInt Connect();
       
   125 	};
       
   126 
       
   127 class RGenConAgentDialogServer : public RSessionBase
       
   128 /**
       
   129 RGenConAgentDialogServer. This components needs to be written as a 
       
   130 proper polymorphic DLL in JetStream.
       
   131 
       
   132 NOTE! Although the class inherits from RSessionBase this does not mean you 
       
   133 have to implement the API as a client server mechanism.
       
   134 
       
   135 @internalTechnology
       
   136 */
       
   137 	{
       
   138 public:
       
   139 	IMPORT_C RGenConAgentDialogServer();
       
   140 	IMPORT_C ~RGenConAgentDialogServer();
       
   141 	IMPORT_C TVersion Version() const;
       
   142 	IMPORT_C TInt Connect();
       
   143 	IMPORT_C void Close();
       
   144 	IMPORT_C void ModemAndLocationSelection(TUint32& aModemId,TUint32& aLocationId,TRequestStatus& aStatus);
       
   145 	IMPORT_C void IapConnection(TUint32& aIAP, const TConnectionPrefs& aPrefs, TRequestStatus& aStatus);
       
   146 	IMPORT_C void IapConnection(TUint32& aIAP, const TConnectionPrefs& aPrefs, TInt aLastError, TRequestStatus& aStatus);
       
   147 	IMPORT_C void WarnNewIapConnection(const TConnectionPrefs& aPrefs, TInt aLastError, const TDesC& aNewIapName, TBool& aResponse, TRequestStatus& aStatus);
       
   148 	IMPORT_C void Login(TDes& aUsername, TDes& aPassword, TBool aIsReconnect, TRequestStatus& aStatus);
       
   149 	IMPORT_C void Authenticate(TDes& aUsername, TDes& aPassword, TBool aIsReconnect, TRequestStatus& aStatus);
       
   150 	IMPORT_C void Reconnect(TBool& aResponse, TRequestStatus& aStatus);
       
   151 	IMPORT_C TInt OpenPct();
       
   152 	IMPORT_C TInt WritePct(const TDesC& aData);
       
   153 	IMPORT_C void ReadPct(TDes& aData, TRequestStatus& aStatus);
       
   154 	IMPORT_C void DestroyPctNotification(TRequestStatus& aStatus);
       
   155 	IMPORT_C void ClosePct();
       
   156 	IMPORT_C void QoSWarning(TBool& aResponse, TRequestStatus& aStatus);
       
   157 	IMPORT_C void CancelModemAndLocationSelection();
       
   158 	IMPORT_C void CancelIapConnection();
       
   159 	IMPORT_C void CancelWarnNewIapConnection();
       
   160 	IMPORT_C void CancelLogin();
       
   161 	IMPORT_C void CancelAuthenticate();
       
   162 	IMPORT_C void CancelReconnect();
       
   163 	IMPORT_C void CancelReadPct();
       
   164 	IMPORT_C void CancelDestroyPctNotification();
       
   165 	IMPORT_C void CancelQoSWarning();
       
   166 	IMPORT_C void AccessPointConnection(TUint32& aAccessPoint, TInt aAccessPointGroup, TRequestStatus& aStatus);
       
   167 	IMPORT_C void CancelAccessPointConnection();
       
   168 	IMPORT_C void AccessPointConnection(TUint32& aAP, TUint32 aAPType, TUint32& aBearerAPInd, TUint32 aBearerAPType, TRequestStatus& aStatus);
       
   169 
       
   170 private:
       
   171 	RDialogNotifier* iNotifier;
       
   172 	TPckg<TUint32> iIAP;
       
   173 	TPckg<TUint32> iModemId;
       
   174 	TPckg<TUint32> iLocationId;
       
   175 	TPckgBuf<TIspConnectionNames> iConNames;
       
   176 	TPckgBuf<TConnectionPrefs> iPrefs;
       
   177 	TPckg<TBool> iBool;
       
   178 	TPckgBuf<TUint32> iPctBuffer;
       
   179 	TPckgBuf<TPctResponse> iPctResponse;
       
   180 	TPckgBuf<TAuthenticationPair> iAuthenticationPair;
       
   181 	TPckgBuf<TNewIapConnectionPrefs> iNewIapPrefsBuffer;
       
   182 	TPckgBuf<TUint32> iNotUsed;		// Parameters not used by plugin
       
   183 	TRequestStatus iStatus;
       
   184 	TPckg<TUint32> iAccessPoint;
       
   185 //	__FLOG_DECLARATION_MEMBER;
       
   186 	};
       
   187 
       
   188 IMPORT_C TInt StartDialogThread();
       
   189 
       
   190 #endif