genericopenlibs/openenvcore/backend/inc/sysif.h
branchRCL_3
changeset 64 c44f36bb61a3
parent 57 2efc27d87e1c
child 75 254b651f304e
--- a/genericopenlibs/openenvcore/backend/inc/sysif.h	Wed Sep 15 00:31:55 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/inc/sysif.h	Wed Sep 15 14:02:55 2010 +0300
@@ -36,6 +36,7 @@
 #include <rpipe.h>
 
 #include<tz.h>
+#include <e32atomics.h>
 
 #ifdef SYMBIAN_OE_POSIX_SIGNALS
 #include "signalclient.h"
@@ -114,7 +115,7 @@
 */
 	{
 public:
-	void StorePtrs(RHeap* aHeap, RFs* aFs, RSocketServ* aSs, RCommServ* aCs, RFastLock* aSsLock, RFastLock* aCsLock,RFastLock* aDefConnLock,RFastLock* aAESelectLock)
+	void StorePtrs(RHeap* aHeap, RFs* aFs, RSocketServ* aSs, RCommServ* aCs, RFastLock* aSsLock, RFastLock* aCsLock,RFastLock* aDefConnLock,RFastLock* aAESelectLock,RFastLock* aTzServerLock)
 		{
 		iHeap = aHeap;
 		iFs = aFs;
@@ -124,6 +125,7 @@
 		iCsLock = aCsLock;
 		iDefConnLock = aDefConnLock;
 		iAESelectLock = aAESelectLock;
+		iTzServerLock = aTzServerLock;
 		}
 
 	~TCLSICleanup()
@@ -136,6 +138,7 @@
 		iHeap->Close();
 		iDefConnLock->Close();
 		iAESelectLock->Close();
+		iTzServerLock->Close();
 		}
 private:
 	RHeap* iHeap;
@@ -145,7 +148,8 @@
 	RFastLock* iSsLock;
 	RFastLock* iCsLock;
 	RFastLock* iDefConnLock;
-	RFastLock* iAESelectLock;	
+	RFastLock* iAESelectLock;
+	RFastLock* iTzServerLock;
 	};
 
 
@@ -453,6 +457,8 @@
 	int popen (const wchar_t* file, const wchar_t* cmd, const char* mode, int& anErrno);
 	int pclose (int aFid, int& anErrno);
 	IMPORT_C void CheckOrigins (wchar_t**& wenvp, int& aCount);
+    IMPORT_C void freednssuffixes(if_dns_suffixes * suffixes);
+    
 #ifdef SYMBIAN_OE_POSIX_SIGNALS
 	TInt SignalHandler();
 	IMPORT_C void InitSignalHandler();
@@ -591,6 +597,8 @@
 	//Save the file server session path
 	TInt SaveSessionPath(const TDesC& aPath);
 	
+	static void WaitForNRequest(TRequestStatus **aStatusArray, TInt aNum);
+	
 	static void WaitForNRequest(TRequestStatus aStatusArray[], TInt aNum);
 
 private:
@@ -613,6 +621,8 @@
 	// default RConnection with the new settings.
 	TInt StartDefConnection();
 	
+	// Helper function for doing an on-demand connection to RTz server
+	TInt OnDemandTZServerConnection();
 private:
 	// NOTE: iCleanup should be the first member of CLSI, since iPrivateHeap
 	// will be destroyed from within iCleanup destructor.
@@ -689,6 +699,8 @@
 	// Default connection settings, set/cleared using setdefaultif
 	TConnPref* iDefConnPref;
     RTz     iTzServer;	
+	RFastLock iTzServerLock;
+	TBool	iIsRTzConnected;
     RPointerArray<CSocketDesc> iSocketArray;
 #ifdef SYMBIAN_OE_POSIX_SIGNALS
 	// Signal handler thread
@@ -842,10 +854,8 @@
 #endif // SYMBIAN_OE_POSIX_SIGNALS
 public:
 
-   inline RTz & TZServer()
-        {
-        return iTzServer;
-        } 
+	IMPORT_C RTz & TZServer(TInt& aStatus);
+	
 //ipc server session
 RIpcSession iIpcS;
 friend class RFileDesTransferSession;
@@ -956,6 +966,7 @@
 	TUSockAddr() : TSockAddr(), iError(0) {}
 
 	TUSockAddr(TAny* addr);			// constructor form of Prepare
+	TUSockAddr(const TSockAddr& aSockAddr):TSockAddr(aSockAddr),iError(0){};
 	IMPORT_C TUSockAddr(const TAny* addr, TUint len);	// constructor form of Set
 private:
 	void Prepare(TAny* addr);