linklayerprotocols/pppnif/INC/PPPConfig.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // PPP CFProtocol Provisioning Message class definitions
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 
       
    24 #ifndef PPPCONFIG_H
       
    25 #define PPPCONFIG_H
       
    26 
       
    27 #include <cdbcols.h>
       
    28 #include <metadatabase.h>			// for TMDBElementId
       
    29 #include <comms-infras/agentmessages.h>
       
    30 #include <comms-infras/linkprovision.h>
       
    31 
       
    32 
       
    33 namespace ESock
       
    34 	{
       
    35 	class CCommsDatIapView;
       
    36 	}
       
    37 
       
    38 
       
    39 class CPppLcpConfig : public CBase, public Meta::SMetaData
       
    40 /**
       
    41 
       
    42 @internalTechnology
       
    43 @released Since 9.4
       
    44 */
       
    45 	{
       
    46 public:
       
    47 
       
    48 enum TPppLinkMode
       
    49 	{
       
    50 	EPppLinkIsUnknown,
       
    51 	EPppLinkIsAuto,
       
    52 	EPppLinkIsClient,
       
    53 	EPppLinkIsServer
       
    54 	};
       
    55 
       
    56     enum
       
    57     {
       
    58     EUid = 0x1000022C,
       
    59     ETypeId = 1,
       
    60     };
       
    61 
       
    62 	IMPORT_C static CPppLcpConfig* NewLC(ESock::CCommsDatIapView* aIapView);
       
    63 
       
    64     //getters
       
    65     inline TPppLinkMode GetIfServerMode() const;
       
    66     inline TInt GetIfCallbackType() const;
       
    67     inline const TDesC& GetIfParams() const;
       
    68     inline const TDesC& GetIfCallbackInfo() const;
       
    69     inline TBool GetIfCallbackEnabled() const;
       
    70     inline TBool GetEnableLcpExtensions() const;
       
    71     inline TBool GetEnableSwComp() const;
       
    72 #if defined (_DEBUG)
       
    73     inline const TDesC& GetISPName() const;
       
    74     inline void  SetISPName(HBufC* aISPName);
       
    75 #endif
       
    76     //setters
       
    77     inline void  SetIfServerMode(TPppLinkMode aIfServerMode);
       
    78     inline void  SetIfCallbackType(TInt aIfCallbackType);
       
    79     inline void  SetIfParams(HBufC* aIfParams);
       
    80     inline void  SetIfCallbackInfo(HBufC* aIfCallbackInfo);
       
    81     inline void  SetIfCallbackEnabled(TBool aIfCallbackEnabled);
       
    82     inline void  SetEnableLcpExtensions(TBool aEnableLcpExtensions);
       
    83     inline void  SetEnableSwComp(TBool aEnableSwComp);
       
    84 
       
    85 public:
       
    86     EXPORT_DATA_VTABLE_AND_FN
       
    87 
       
    88 protected:
       
    89 	~CPppLcpConfig()
       
    90 		{
       
    91 #if defined (_DEBUG)
       
    92 	    iISPName.Close();
       
    93 #endif
       
    94 	    }
       
    95 
       
    96 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
    97 
       
    98 protected:
       
    99     TPppLinkMode  iIfServerMode;
       
   100     TInt  iIfCallbackType;
       
   101     RBuf  iIfParams;
       
   102     RBuf  iIfCallbackInfo;
       
   103     TUint iIfCallbackEnabled:1;
       
   104     TUint iEnableLcpExtensions:1;
       
   105     TUint iEnableSwComp:1;
       
   106 #if defined (_DEBUG)
       
   107     RBuf  iISPName;
       
   108 #endif
       
   109 };
       
   110 
       
   111 class CPppAuthConfig : public CBase, public Meta::SMetaData
       
   112 /**
       
   113 
       
   114 @internalTechnology
       
   115 @released Since 9.4
       
   116 */
       
   117 	{
       
   118 public:
       
   119     enum
       
   120     {
       
   121     EUid = 0x1000022C,
       
   122     ETypeId = 2,
       
   123     };
       
   124 
       
   125     IMPORT_C static CPppAuthConfig* NewLC(ESock::CCommsDatIapView* aIapView);
       
   126 
       
   127     //getters
       
   128     inline TBool GetServiceEnableSwComp() const;
       
   129     //setters
       
   130     inline void  SetServiceEnableSwComp(TBool aServiceEnableSwComp);
       
   131 
       
   132 public:
       
   133     EXPORT_DATA_VTABLE_AND_FN
       
   134 
       
   135 protected:
       
   136 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
   137 
       
   138 protected:
       
   139 	TUint iServiceEnableSwComp:1;
       
   140 };
       
   141 
       
   142 
       
   143 
       
   144 class CPppProvisionInfo : public Meta::SMetaData
       
   145 	{
       
   146 public:
       
   147     enum
       
   148     {
       
   149     EUid = 0x1000022C,
       
   150     ETypeId = 3,
       
   151     };
       
   152 
       
   153     IMPORT_C ~CPppProvisionInfo();
       
   154 
       
   155 	inline const TDesC8& ExcessData() const;
       
   156 	inline TInt IsDialIn() const;
       
   157 	inline TAny* NotificationData() const;
       
   158 
       
   159 	inline TInt SetExcessData(const TDesC8& aData);
       
   160 	inline void SetIsDialIn(TInt aValue);
       
   161 	inline void SetNotificationData(TAny* aNotificationData);
       
   162 
       
   163 private:
       
   164 	// void* argument of last Notification(TAgentToNifEventType, void*) call from Agent
       
   165 	TAny* iNotificationData;
       
   166 	// result of GetExcessData() call on Agent
       
   167 	RBuf8 iExcessData;
       
   168 	// result of Notification(ENifToAgentEventTypeQueryIsDialIn)
       
   169 	TInt iIsDialIn;
       
   170 
       
   171 public:
       
   172 	EXPORT_DATA_VTABLE_AND_FN
       
   173 	};
       
   174 
       
   175 class CPppTsyConfig : public Meta::SMetaData
       
   176 	{
       
   177 public:
       
   178     enum
       
   179     {
       
   180     EUid = 0x1000022C,
       
   181     ETypeId = 4,
       
   182     };
       
   183 
       
   184     IMPORT_C static CPppTsyConfig* NewLC(ESock::CCommsDatIapView* aIapView);
       
   185 	
       
   186 	inline const TName& TsyName() const ;
       
   187 	inline void SetTsyName(const TName& aTsyName);
       
   188 	
       
   189 protected:
       
   190 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
   191 
       
   192 	
       
   193 private:
       
   194 	TName iTsyName;
       
   195 
       
   196 public:
       
   197 	EXPORT_DATA_VTABLE_AND_FN
       
   198 	};
       
   199 
       
   200 #include <networking/pppconfig.inl>
       
   201 #endif
       
   202 // PPPCONFIG_H