epoc32/include/nifman.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 1997-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 // Interface Manager API
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20 */
    21 
    22 
    23 #if !defined(__NIFMAN_H__)
    24 #define __NIFMAN_H__
    25 
    26 #include <nifvar.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 	};
    45 
    46 class CNifMan;
    47 class MNifIfUser;
    48 class CNifFactory : public CObject
    49 /**
    50 Manager classes
    51 
    52 @publishedPartner
    53 @released
    54 */
    55 	{
    56 friend class CNifMan;
    57 public:
    58 	IMPORT_C CNifFactory();
    59 	IMPORT_C virtual TInt Open();
    60 	IMPORT_C virtual void Close();
    61 	IMPORT_C static void Cleanup(TAny* aObject);
    62     IMPORT_C static TInt ControlledDelete(TAny* aFactory);
    63 	IMPORT_C void InitL(RLibrary& aLib, CObjectCon& aCon);
    64 
    65 protected:
    66 	IMPORT_C ~CNifFactory();
    67 	virtual void InstallL()=0;
    68 	RLibrary iLib;
    69 	CAsyncCallBack* iAsyncDtor;
    70 	};
    71 
    72 
    73 /**
    74 Client side classes
    75 async message for progress notifier
    76 
    77 @publishedAll
    78 @deprecated 7.0s - replaced with RConnection API
    79 */
    80 const TInt KDefaultNifSlots = 1;	
    81 
    82 
    83 /**
    84 @publishedPartner
    85 @released
    86 @capability NetworkControl These control options affect configuration at the designated level.  
    87 @ref RConnection::Control
    88 */
    89 const TUint KCOLInterface = 100;
    90 
    91 /**
    92 @publishedPartner
    93 @released
    94 @capability NetworkControl These control options affect configuration at the designated level.  
    95 @ref RConnection::Control
    96 */
    97 const TUint KCOLAgent     = 200;
    98 
    99 
   100 // RConnection::Ioctl() level for NIFMAN
   101 
   102 /**
   103 @publishedPartner
   104 @released
   105 @ref RConnection::Ioctl
   106 */
   107 const TUint KCOLConfiguration = 300;
   108 
   109 // RConnection::Control() options
   110 
   111 /**
   112 @publishedPartner
   113 @released
   114 @capability NetworkControl Restrict ability to switch on/off idle timers  
   115 @ref RConnection::Control
   116 */
   117 const TUint KConnDisableTimers = KConnReadUserDataBit | 1;
   118 
   119 /**
   120 @publishedPartner
   121 @released
   122 @ref RConnection::Control
   123 */
   124 const TUint KConnGetInterfaceName = KConnReadUserDataBit | KConnWriteUserDataBit | 2;
   125 
   126 
   127 // RConnection::Ioctl() options
   128 
   129 /**
   130 @publishedPartner
   131 @released
   132 @ref RConnection::Ioctl
   133 */
   134 const TUint KConnGetCurrentAddr = KConnWriteUserDataBit | 3;
   135 
   136 /**
   137 @publishedPartner
   138 @released
   139 @ref RConnection::Ioctl
   140 */
   141 const TUint KConnGetServerAddr = KConnWriteUserDataBit | 4;
   142 
   143 /**
   144 @publishedPartner
   145 @released
   146 @ref RConnection::Ioctl
   147 */
   148 const TUint KConnGetAddrLeaseTimeRemain = KConnWriteUserDataBit | 5;
   149 
   150 /**
   151 @publishedPartner
   152 @released
   153 @capability NetworkControl Restrict ability to release a configured address  
   154 @ref RConnection::Ioctl
   155 */
   156 const TUint KConnAddrRelease = 6;
   157 
   158 /**
   159 @publishedPartner
   160 @released
   161 @capability NetworkControl Restrict ability to renew a configured address  
   162 @ref RConnection::Ioctl 
   163 
   164 This option is used for user initiated RENEW request where an attempt 
   165 is made to renew the lease obtained from the orginal DHCP server.
   166 If the server response is not received before the default timeout(RebindTimeT2 - RenewalTimeT1)
   167 the dhcp client will then initiate a REBIND.An user defined timeout can also be
   168 supplied when using this option which will override the default timeout value. 
   169 
   170 @code
   171 	RConnection conn; 
   172 	TRequestStatus stat;
   173 	//Start a connection 
   174 	..... 
   175 	.....	
   176 	//Option1: Initiate a Renew request. 
   177 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat);
   178 
   179 	//Option2: Initiate a Renew request with a user defined timeout 
   180 	TInt secValue(2); //Eg timeout set to 2secs
   181 	TPckg<TInt> val(secValue);		
   182 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat,&val);
   183 @endcode
   184 */
   185 const TUint KConnAddrRenew = 7;
   186 
   187 // DHCP specific RConnection::Ioctl options
   188 /**
   189 @publishedPartner
   190 @released
   191 @ref RConnection::Ioctl
   192 */const TUint KConnGetDhcpRawOptionData = KConnWriteUserDataBit|KConnReadUserDataBit|100;
   193 
   194 /**
   195 @publishedPartner
   196 @released
   197 @ref RConnection::Ioctl
   198 */
   199 const TUint KConnGetSipServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|101;
   200 
   201 /**
   202 @publishedPartner
   203 @released
   204 @ref RConnection::Ioctl
   205 */
   206 const TUint KConnGetSipServerDomain = KConnWriteUserDataBit|KConnReadUserDataBit|102;
   207 
   208 /**
   209 * This constant is used to retrieve the DHCP Header Sname which is the 
   210 * host name of the next available server. This is sometimes overloaded 
   211 * to carry option value 66 which is the TftpServerName. 
   212 * @publishedPartner
   213 * @released
   214 * @see RConnection::Ioctl()
   215 */
   216 const TUint KConnGetDhcpHdrSname = KConnWriteUserDataBit|KConnReadUserDataBit|104;
   217 
   218 /**
   219 * This constant is used to retrieve the DHCP Header Siaddr which is the 
   220 * IPAddress of the next available server.
   221 * @publishedPartner
   222 * @released
   223 * @see RConnection::Ioctl()
   224 */
   225 const TUint KConnGetDhcpHdrSiaddr = KConnWriteUserDataBit|KConnReadUserDataBit|105;
   226 
   227 /**
   228 * This constant is used to retrieve the DHCP Option 66, Tftp Server Name.
   229 * @publishedPartner
   230 * @released
   231 * @see RConnection::Ioctl()
   232 */
   233 const TUint KConnGetTftpServerName = KConnWriteUserDataBit|KConnReadUserDataBit|106;
   234 
   235 /**
   236 * This constant is used to retrieve the DHCP Option 150, Tftp Server Address.
   237 * @publishedPartner
   238 * @released
   239 * @see RConnection::Ioctl()
   240 */
   241 const TUint KConnGetTftpServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|107;
   242 
   243 
   244 /**
   245 * This constant is used to retrieve multiple opcode data in a raw format.
   246 * @publishedPartner
   247 * @released
   248 * @see RConnection::Ioctl()
   249 */
   250 const TUint KConnDhcpGetMultipleParams  = KConnWriteUserDataBit|KConnReadUserDataBit|108;
   251 
   252 /**
   253 @publishedPartner
   254 @released
   255 */
   256 const TUint KConnMaxInterfaceName = 32;
   257 
   258 class TConnInterfaceName
   259 /**
   260 @publishedPartner
   261 @released
   262 */
   263 	{
   264 public:
   265 	TUint iIndex;
   266 	TBuf<KConnMaxInterfaceName> iName;
   267 	};
   268 
   269 
   270 /**
   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
   272 * its pool to the authorised hardware address as configured by the application.
   273 * @publishedPartner
   274 * @released
   275 * @see RConnection::Ioctl()
   276 */
   277 const TUint KConnDhcpSetHwAddressParams = KConnWriteUserDataBit|KConnReadUserDataBit|109;
   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 
   299 
   300 #endif // __NIFMAN_H__