epoc32/include/nifman.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 
    20 /**
    21  @file
    22 */
    23 
    24 
    25 #if !defined(__NIFMAN_H__)
    26 #define __NIFMAN_H__
    27 
    28 #include <es_prot.h>
    29 #include <nifvar.h>
    30 #include <cdbover.h>
    31 
    32 class CNifMan;
    33 class CNifFactory : public CObject
    34 /**
    35 Manager classes
    36 
    37 @publishedPartner
    38 @released
    39 */
    40 	{
    41 friend class CNifMan;
    42 public:
    43 	IMPORT_C CNifFactory();
    44 	IMPORT_C virtual TInt Open();
    45 	IMPORT_C virtual void Close();
    46 	IMPORT_C static void Cleanup(TAny* aObject);
    47     IMPORT_C static TInt ControlledDelete(TAny* aFactory);
    48 	IMPORT_C void InitL(RLibrary& aLib, CObjectCon& aCon);
    49 
    50 protected:
    51 	IMPORT_C ~CNifFactory();
    52 	virtual void InstallL()=0;
    53 	RLibrary iLib;
    54 	CAsyncCallBack* iAsyncDtor;
    55 	};
    56 
    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 
    98 /**
    99 Client side classes
   100 async message for progress notifier
   101 
   102 @publishedAll
   103 @deprecated 7.0s - replaced with RConnection API
   104 */
   105 const TInt KDefaultNifSlots = 1;	
   106 
   107 
   108 /**
   109 @publishedPartner
   110 @released
   111 @capability NetworkControl These control options affect configuration at the designated level.  
   112 @ref RConnection::Control
   113 */
   114 const TUint KCOLInterface = 100;
   115 
   116 /**
   117 @publishedPartner
   118 @released
   119 @capability NetworkControl These control options affect configuration at the designated level.  
   120 @ref RConnection::Control
   121 */
   122 const TUint KCOLAgent     = 200;
   123 
   124 
   125 // RConnection::Ioctl() level for NIFMAN
   126 
   127 /**
   128 @publishedPartner
   129 @released
   130 @ref RConnection::Ioctl
   131 */
   132 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 
   143 // RConnection::Control() options
   144 
   145 /**
   146 @publishedPartner
   147 @released
   148 @capability NetworkControl Restrict ability to switch on/off idle timers  
   149 @ref RConnection::Control
   150 */
   151 const TUint KConnDisableTimers = KConnReadUserDataBit | 1;
   152 
   153 /**
   154 @publishedPartner
   155 @released
   156 @ref RConnection::Control
   157 */
   158 const TUint KConnGetInterfaceName = KConnReadUserDataBit | KConnWriteUserDataBit | 2;
   159 
   160 
   161 // RConnection::Ioctl() options
   162 
   163 /**
   164 @publishedPartner
   165 @released
   166 @ref RConnection::Ioctl
   167 */
   168 const TUint KConnGetCurrentAddr = KConnWriteUserDataBit | 3;
   169 
   170 /**
   171 @publishedPartner
   172 @released
   173 @ref RConnection::Ioctl
   174 */
   175 const TUint KConnGetServerAddr = KConnWriteUserDataBit | 4;
   176 
   177 /**
   178 @publishedPartner
   179 @released
   180 @ref RConnection::Ioctl
   181 */
   182 const TUint KConnGetAddrLeaseTimeRemain = KConnWriteUserDataBit | 5;
   183 
   184 /**
   185 @publishedPartner
   186 @released
   187 @capability NetworkControl Restrict ability to release a configured address  
   188 @ref RConnection::Ioctl
   189 */
   190 const TUint KConnAddrRelease = 6;
   191 
   192 /**
   193 @publishedPartner
   194 @released
   195 @capability NetworkControl Restrict ability to renew a configured address  
   196 @ref RConnection::Ioctl 
   197 
   198 This option is used for user initiated RENEW request where an attempt 
   199 is made to renew the lease obtained from the orginal DHCP server.
   200 If the server response is not received before the default timeout(RebindTimeT2 - RenewalTimeT1)
   201 the dhcp client will then initiate a REBIND.An user defined timeout can also be
   202 supplied when using this option which will override the default timeout value. 
   203 
   204 @code
   205 	RConnection conn; 
   206 	TRequestStatus stat;
   207 	//Start a connection 
   208 	..... 
   209 	.....	
   210 	//Option1: Initiate a Renew request. 
   211 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat);
   212 
   213 	//Option2: Initiate a Renew request with a user defined timeout 
   214 	TInt secValue(2); //Eg timeout set to 2secs
   215 	TPckg<TInt> val(secValue);		
   216 	conn.Ioctl(KCOLConfiguration, KConnAddrRenew, stat,&val);
   217 @endcode
   218 */
   219 const TUint KConnAddrRenew = 7;
   220 
   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
   251 /**
   252 @publishedPartner
   253 @released
   254 @ref RConnection::Ioctl
   255 */const TUint KConnGetDhcpRawOptionData = KConnWriteUserDataBit|KConnReadUserDataBit|100;
   256 
   257 /**
   258 @publishedPartner
   259 @released
   260 @ref RConnection::Ioctl
   261 */
   262 const TUint KConnGetSipServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|101;
   263 
   264 /**
   265 @publishedPartner
   266 @released
   267 @ref RConnection::Ioctl
   268 */
   269 const TUint KConnGetSipServerDomain = KConnWriteUserDataBit|KConnReadUserDataBit|102;
   270 
   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 /**
   282 * 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 
   284 * to carry option value 66 which is the TftpServerName. 
   285 * @publishedPartner
   286 * @released
   287 * @see RConnection::Ioctl()
   288 */
   289 const TUint KConnGetDhcpHdrSname = KConnWriteUserDataBit|KConnReadUserDataBit|104;
   290 
   291 /**
   292 * This constant is used to retrieve the DHCP Header Siaddr which is the 
   293 * IPAddress of the next available server.
   294 * @publishedPartner
   295 * @released
   296 * @see RConnection::Ioctl()
   297 */
   298 const TUint KConnGetDhcpHdrSiaddr = KConnWriteUserDataBit|KConnReadUserDataBit|105;
   299 
   300 /**
   301 * This constant is used to retrieve the DHCP Option 66, Tftp Server Name.
   302 * @publishedPartner
   303 * @released
   304 * @see RConnection::Ioctl()
   305 */
   306 const TUint KConnGetTftpServerName = KConnWriteUserDataBit|KConnReadUserDataBit|106;
   307 
   308 /**
   309 * This constant is used to retrieve the DHCP Option 150, Tftp Server Address.
   310 * @publishedPartner
   311 * @released
   312 * @see RConnection::Ioctl()
   313 */
   314 const TUint KConnGetTftpServerAddr = KConnWriteUserDataBit|KConnReadUserDataBit|107;
   315 
   316 
   317 /**
   318 * This constant is used to retrieve multiple opcode data in a raw format.
   319 * @publishedPartner
   320 * @released
   321 * @see RConnection::Ioctl()
   322 */
   323 const TUint KConnDhcpGetMultipleParams  = KConnWriteUserDataBit|KConnReadUserDataBit|108;
   324 #endif //SYMBIAN_NETWORKING_DHCP_MSG_HEADERS
   325 
   326 
   327 /**
   328 @publishedPartner
   329 @released
   330 */
   331 const TUint KConnMaxInterfaceName = 32;
   332 
   333 class TConnInterfaceName
   334 /**
   335 @publishedPartner
   336 @released
   337 */
   338 	{
   339 public:
   340 	TUint iIndex;
   341 	TBuf<KConnMaxInterfaceName> iName;
   342 	};
   343 /**
   344 @internalTechnology
   345 */
   346 enum TAgentConnectType 
   347 	{
   348 	EAgentStartDialOut,
   349 	EAgentReconnect,
   350 	EAgentStartCallBack,
   351 	EAgentNone,
   352 	EAgentStartDialIn
   353 	};
   354 
   355 #endif // __NIFMAN_H__