epoc32/include/nifman.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // 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
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    13 // Description:
    13 // Description:
    14 // Interface Manager API
    14 // Interface Manager API
    15 // 
    15 // 
    16 //
    16 //
    17 
    17 
    18 
       
    19 
       
    20 /**
    18 /**
    21  @file
    19  @file
    22 */
    20 */
    23 
    21 
    24 
    22 
    25 #if !defined(__NIFMAN_H__)
    23 #if !defined(__NIFMAN_H__)
    26 #define __NIFMAN_H__
    24 #define __NIFMAN_H__
    27 
    25 
    28 #include <es_prot.h>
       
    29 #include <nifvar.h>
    26 #include <nifvar.h>
    30 #include <cdbover.h>
    27 
       
    28 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    29 #include <nifman_internal.h>
       
    30 #else
       
    31 #include <es_sock_partner.h>
       
    32 #endif
       
    33 
       
    34 /**
       
    35 @publishedPartner
       
    36 */
       
    37 enum TAgentConnectType 
       
    38 	{
       
    39 	EAgentStartDialOut,
       
    40 	EAgentReconnect,
       
    41 	EAgentStartCallBack,
       
    42 	EAgentNone,
       
    43 	EAgentStartDialIn
       
    44 	};
    31 
    45 
    32 class CNifMan;
    46 class CNifMan;
       
    47 class MNifIfUser;
    33 class CNifFactory : public CObject
    48 class CNifFactory : public CObject
    34 /**
    49 /**
    35 Manager classes
    50 Manager classes
    36 
    51 
    37 @publishedPartner
    52 @publishedPartner
    52 	virtual void InstallL()=0;
    67 	virtual void InstallL()=0;
    53 	RLibrary iLib;
    68 	RLibrary iLib;
    54 	CAsyncCallBack* iAsyncDtor;
    69 	CAsyncCallBack* iAsyncDtor;
    55 	};
    70 	};
    56 
    71 
    57 /**
       
    58 Static internal API class
       
    59 @internalComponent
       
    60 */
       
    61 enum TNifSocketState { ENifBuffers2048=-4, ENifBuffers1024, ENifBuffers512, 
       
    62 					   ENifSocketNull=-1,
       
    63                        ENifSocketCreated=0, ENifSocketOpen=3, ENifSocketConnected=4,
       
    64 					   ENifSocketError=9 };
       
    65 
       
    66 class MNifIfUser;
       
    67 class MNifIfNotify;
       
    68 class CNifIfBase;
       
    69 class CNifAgentBase;
       
    70 class CSockSession;
       
    71 class CConnectionProvdBase;
       
    72 class Nif
       
    73 /**
       
    74 @internalTechnology
       
    75 */
       
    76 	{
       
    77 public:
       
    78 	/** Network protocol support */
       
    79 	IMPORT_C static void BindL(MNifIfUser& aUser, TAny* aId, TDes& aResult, const TDesC& aName=TPtrC(0,0));
       
    80 	IMPORT_C static void NetworkLayerClosed(MNifIfUser& aUser);
       
    81 	IMPORT_C static void StartL(TDes& aResult, const TDesC& aName=TPtrC());
       
    82 	IMPORT_C static void Stop(const TDesC& aName=TPtrC());
       
    83 	IMPORT_C static CNifIfBase* CreateInterfaceL(const TDesC& aName, MNifIfNotify* aNotify);
       
    84 	IMPORT_C static CNifAgentBase* CreateAgentL(const TDesC& aAgentName, const TBool aNewInstance = EFalse);
       
    85 	IMPORT_C static void CheckInstalledMBufManagerL();
       
    86 	IMPORT_C static CProtocolBase* IsProtocolLoaded(const TDesC& aName);
       
    87 	IMPORT_C static void CheckInstalledL();
       
    88 	IMPORT_C static TInt SetSocketState(TNifSocketState aState, CServProviderBase* aProvd);
       
    89 	IMPORT_C static void ProgressL(TNifProgress& aProgress, const TDesC& aName=TPtrC());
       
    90 	IMPORT_C static void Stop(TAny* aId, CNifIfBase* aIf=0);
       
    91 	IMPORT_C static void ProgressL(TNifProgress& aProgress, TAny* aId, CNifIfBase* aIf=0);
       
    92 	IMPORT_C static CConnectionProvdBase* NewConnectionL(MConnectionNotify* aConnection, TUint aId);
       
    93 	/** deprecated function */
       
    94 	IMPORT_C static CNifIfBase* CreateInterfaceL(const TDesC& aName);
       
    95 	};
       
    96 
       
    97 
    72 
    98 /**
    73 /**
    99 Client side classes
    74 Client side classes
   100 async message for progress notifier
    75 async message for progress notifier
   101 
    76 
   128 @publishedPartner
   103 @publishedPartner
   129 @released
   104 @released
   130 @ref RConnection::Ioctl
   105 @ref RConnection::Ioctl
   131 */
   106 */
   132 const TUint KCOLConfiguration = 300;
   107 const TUint KCOLConfiguration = 300;
   133 
       
   134 #ifdef _DEBUG
       
   135 /**
       
   136 Debug-only option level used to pass test-only option names onto PPP.
       
   137 @internalTechnology
       
   138 */
       
   139 const TUint KCOLLinkLayerTestLevel = 325;
       
   140 #endif
       
   141 
       
   142 
   108 
   143 // RConnection::Control() options
   109 // RConnection::Control() options
   144 
   110 
   145 /**
   111 /**
   146 @publishedPartner
   112 @publishedPartner
   216 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat,&val);
   182 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat,&val);
   217 @endcode
   183 @endcode
   218 */
   184 */
   219 const TUint KConnAddrRenew = 7;
   185 const TUint KConnAddrRenew = 7;
   220 
   186 
   221 /**
       
   222 @internalTechnology
       
   223 @released 9.1
       
   224 */
       
   225 const TUint KNifSessionSetConnectionAttempt = KConnInternalOptionBit|8;
       
   226 
       
   227 /**
       
   228 @internalTechnology
       
   229 @released 9.1
       
   230 */
       
   231 const TUint KNifSessionGetConnectionAttempt = KConnInternalOptionBit|9;
       
   232 /**
       
   233 @internalTechnology
       
   234 @released 9.1
       
   235 */
       
   236 const TUint KNifSessionSetBlockProgresses = KConnInternalOptionBit|10;
       
   237 
       
   238 /**
       
   239 @internalTechnology
       
   240 @released 9.1
       
   241 */
       
   242 const TUint KNifSessionGetBlockProgresses = KConnInternalOptionBit|11;
       
   243 
       
   244 /**
       
   245 @internalTechnology
       
   246 @released 9.1
       
   247 */
       
   248 const TUint KNifSessionGetStopping = KConnInternalOptionBit|12;
       
   249 
       
   250 // DHCP specific RConnection::Ioctl options
   187 // DHCP specific RConnection::Ioctl options
   251 /**
   188 /**
   252 @publishedPartner
   189 @publishedPartner
   253 @released
   190 @released
   254 @ref RConnection::Ioctl
   191 @ref RConnection::Ioctl
   266 @released
   203 @released
   267 @ref RConnection::Ioctl
   204 @ref RConnection::Ioctl
   268 */
   205 */
   269 const TUint KConnGetSipServerDomain = KConnWriteUserDataBit|KConnReadUserDataBit|102;
   206 const TUint KConnGetSipServerDomain = KConnWriteUserDataBit|KConnReadUserDataBit|102;
   270 
   207 
   271 #ifdef SYMBIAN_NETWORKING_DHCPSERVER
       
   272 /**
       
   273 @internalTechnology
       
   274 @released
       
   275 @ref RConnection::Ioctl
       
   276 */
       
   277 const TUint KConnSetDhcpRawOptionData = KConnWriteUserDataBit|KConnReadUserDataBit|103;
       
   278 #endif // SYMBIAN_NETWORKING_DHCPSERVER
       
   279 
       
   280 #ifdef SYMBIAN_NETWORKING_DHCP_MSG_HEADERS
       
   281 /**
   208 /**
   282 * This constant is used to retrieve the DHCP Header Sname which is the 
   209 * This constant is used to retrieve the DHCP Header Sname which is the 
   283 * host name of the next available server. This is sometimes overloaded 
   210 * host name of the next available server. This is sometimes overloaded 
   284 * to carry option value 66 which is the TftpServerName. 
   211 * to carry option value 66 which is the TftpServerName. 
   285 * @publishedPartner
   212 * @publishedPartner
   319 * @publishedPartner
   246 * @publishedPartner
   320 * @released
   247 * @released
   321 * @see RConnection::Ioctl()
   248 * @see RConnection::Ioctl()
   322 */
   249 */
   323 const TUint KConnDhcpGetMultipleParams  = KConnWriteUserDataBit|KConnReadUserDataBit|108;
   250 const TUint KConnDhcpGetMultipleParams  = KConnWriteUserDataBit|KConnReadUserDataBit|108;
   324 #endif //SYMBIAN_NETWORKING_DHCP_MSG_HEADERS
       
   325 
       
   326 
   251 
   327 /**
   252 /**
   328 @publishedPartner
   253 @publishedPartner
   329 @released
   254 @released
   330 */
   255 */
   338 	{
   263 	{
   339 public:
   264 public:
   340 	TUint iIndex;
   265 	TUint iIndex;
   341 	TBuf<KConnMaxInterfaceName> iName;
   266 	TBuf<KConnMaxInterfaceName> iName;
   342 	};
   267 	};
   343 /**
   268 
   344 @internalTechnology
   269 
   345 */
   270 /**
   346 enum TAgentConnectType 
   271 * This constant is used to provision hardware address in the DHCP server. This enables DHCP server to assign the only available IP address in
   347 	{
   272 * its pool to the authorised hardware address as configured by the application.
   348 	EAgentStartDialOut,
   273 * @publishedPartner
   349 	EAgentReconnect,
   274 * @released
   350 	EAgentStartCallBack,
   275 * @see RConnection::Ioctl()
   351 	EAgentNone,
   276 */
   352 	EAgentStartDialIn
   277 const TUint KConnDhcpSetHwAddressParams = KConnWriteUserDataBit|KConnReadUserDataBit|109;
   353 	};
   278  
       
   279 #ifdef SYMBIAN_TCPIPDHCP_UPDATE 
       
   280 /**
       
   281  * This constant is used to retrieve list of domain names to be searched during name resolution.
       
   282  * Ref : RFC 3646 sec 4
       
   283  * @publishedPartner
       
   284  * @released
       
   285  * @see RConnection::Ioctl
       
   286 */
       
   287 const TUint KConnGetDomainSearchList = KConnWriteUserDataBit|KConnReadUserDataBit|110;
       
   288 
       
   289 /**
       
   290  * This constant is used to retrieve list of IPv6 addresses of DNS recursive name servers to which a client's DNS
       
   291    resolver will send DNS queries.
       
   292  * Ref: RFC 3646 sec 3
       
   293  * @publishedPartner
       
   294  * @released
       
   295  * @see RConnection::Ioctl
       
   296 */
       
   297 const TUint KConnGetDNSServerList = KConnWriteUserDataBit|KConnReadUserDataBit|111;
       
   298 #endif //SYMBIAN_TCPIPDHCP_UPDATE 
   354 
   299 
   355 #endif // __NIFMAN_H__
   300 #endif // __NIFMAN_H__