00001
00009 #ifndef __AGENTDIALOG_H__
00010 #define __AGENTDIALOG_H__
00011
00012 #include <e32std.h>
00013 #include <cdbcols.h>
00014 #include <cdblen.h>
00015
00016
00017
00022 _LIT(KCommsDialogServerName, "!NetDialDialogServer");
00023
00024
00025
00026
00027
00028 class TConnectionPrefs
00034 {
00035 public:
00036 TUint32 iRank;
00037 TCommDbConnectionDirection iDirection;
00038 TUint32 iBearerSet;
00039 };
00040
00041 class TIspConnectionNames
00047 {
00048 public:
00049 TBuf<KCommsDbSvrDefaultTextFieldLength> iServiceName;
00050 TBuf<KCommsDbSvrMaxColumnNameLength> iServiceTable;
00051 TBuf<KCommsDbSvrDefaultTextFieldLength> iModemName;
00052 TBuf<KCommsDbSvrDefaultTextFieldLength> iLocationName;
00053 TBuf<KCommsDbSvrDefaultTextFieldLength> iChargecardName;
00054 };
00055
00056 class TAuthenticationPair
00062 {
00063 public:
00064 TDes* iUsername;
00065 TDes* iPassword;
00066 };
00067
00068 class TPctResponse
00074 {
00075 public:
00076 TDes* iBuffer;
00077 };
00078
00079 class TNewIapConnectionPrefs
00085 {
00086 public:
00087 TConnectionPrefs iPrefs;
00088 TInt iLastError;
00089 TBuf<KCommsDbSvrDefaultTextFieldLength> iName;
00090 };
00091
00092 class RDialogNotifier : public RNotifier
00102 {
00103 public :
00104 TInt Connect();
00105 };
00106
00107 class RGenConAgentDialogServer : public RSessionBase
00117 {
00118 public:
00119 IMPORT_C RGenConAgentDialogServer();
00120 IMPORT_C ~RGenConAgentDialogServer();
00121 IMPORT_C TVersion Version() const;
00122 IMPORT_C TInt Connect();
00123 IMPORT_C void Close();
00124 IMPORT_C void ModemAndLocationSelection(TUint32& aModemId,TUint32& aLocationId,TRequestStatus& aStatus);
00125 IMPORT_C void IapConnection(TUint32& aIAP, const TConnectionPrefs& aPrefs, TRequestStatus& aStatus);
00126 IMPORT_C void IapConnection(TUint32& aIAP, const TConnectionPrefs& aPrefs, TInt aLastError, TRequestStatus& aStatus);
00127 IMPORT_C void WarnNewIapConnection(const TConnectionPrefs& aPrefs, TInt aLastError, const TDesC& aNewIapName, TBool& aResponse, TRequestStatus& aStatus);
00128 IMPORT_C void Login(TDes& aUsername, TDes& aPassword, TBool aIsReconnect, TRequestStatus& aStatus);
00129 IMPORT_C void Authenticate(TDes& aUsername, TDes& aPassword, TBool aIsReconnect, TRequestStatus& aStatus);
00130 IMPORT_C void Reconnect(TBool& aResponse, TRequestStatus& aStatus);
00131 IMPORT_C TInt OpenPct();
00132 IMPORT_C TInt WritePct(const TDesC& aData);
00133 IMPORT_C void ReadPct(TDes& aData, TRequestStatus& aStatus);
00134 IMPORT_C void DestroyPctNotification(TRequestStatus& aStatus);
00135 IMPORT_C void ClosePct();
00136 IMPORT_C void QoSWarning(TBool& aResponse, TRequestStatus& aStatus);
00137 IMPORT_C void CancelModemAndLocationSelection();
00138 IMPORT_C void CancelIapConnection();
00139 IMPORT_C void CancelWarnNewIapConnection();
00140 IMPORT_C void CancelLogin();
00141 IMPORT_C void CancelAuthenticate();
00142 IMPORT_C void CancelReconnect();
00143 IMPORT_C void CancelReadPct();
00144 IMPORT_C void CancelDestroyPctNotification();
00145 IMPORT_C void CancelQoSWarning();
00146 IMPORT_C void AccessPointConnection(TUint32& aAccessPoint, TInt aAccessPointGroup, TRequestStatus& aStatus);
00147 IMPORT_C void CancelAccessPointConnection();
00148 IMPORT_C void AccessPointConnection(TUint32& aAP, TUint32 aAPType, TUint32& aBearerAPInd, TUint32 aBearerAPType, TRequestStatus& aStatus);
00149
00150 private:
00151 RDialogNotifier* iNotifier;
00152 TPckg<TUint32> iIAP;
00153 TPckg<TUint32> iModemId;
00154 TPckg<TUint32> iLocationId;
00155 TPckgBuf<TIspConnectionNames> iConNames;
00156 TPckgBuf<TConnectionPrefs> iPrefs;
00157 TPckg<TBool> iBool;
00158 TPckgBuf<TUint32> iPctBuffer;
00159 TPckgBuf<TPctResponse> iPctResponse;
00160 TPckgBuf<TAuthenticationPair> iAuthenticationPair;
00161 TPckgBuf<TNewIapConnectionPrefs> iNewIapPrefsBuffer;
00162 TPckgBuf<TUint32> iNotUsed;
00163 TRequestStatus iStatus;
00164 TPckg<TUint32> iAccessPoint;
00165
00166 };
00167
00168 IMPORT_C TInt StartDialogThread();
00169
00170 #endif