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