branch | RCL_3 |
changeset 75 | 254b651f304e |
parent 64 | c44f36bb61a3 |
64:c44f36bb61a3 | 75:254b651f304e |
---|---|
34 #include <commdb.h> |
34 #include <commdb.h> |
35 #include <commdbconnpref.h> |
35 #include <commdbconnpref.h> |
36 #include <rpipe.h> |
36 #include <rpipe.h> |
37 |
37 |
38 #include<tz.h> |
38 #include<tz.h> |
39 #include <e32atomics.h> |
|
40 |
39 |
41 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
40 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
42 #include "signalclient.h" |
41 #include "signalclient.h" |
43 #include "tsignalmessage.h" |
42 #include "tsignalmessage.h" |
44 |
43 |
113 /* |
112 /* |
114 @internalComponent |
113 @internalComponent |
115 */ |
114 */ |
116 { |
115 { |
117 public: |
116 public: |
118 void StorePtrs(RHeap* aHeap, RFs* aFs, RSocketServ* aSs, RCommServ* aCs, RFastLock* aSsLock, RFastLock* aCsLock,RFastLock* aDefConnLock,RFastLock* aAESelectLock,RFastLock* aTzServerLock) |
117 void StorePtrs(RHeap* aHeap, RFs* aFs, RSocketServ* aSs, RCommServ* aCs, RFastLock* aSsLock, RFastLock* aCsLock,RFastLock* aDefConnLock,RFastLock* aAESelectLock) |
119 { |
118 { |
120 iHeap = aHeap; |
119 iHeap = aHeap; |
121 iFs = aFs; |
120 iFs = aFs; |
122 iSs = aSs; |
121 iSs = aSs; |
123 iCs = aCs; |
122 iCs = aCs; |
124 iSsLock = aSsLock; |
123 iSsLock = aSsLock; |
125 iCsLock = aCsLock; |
124 iCsLock = aCsLock; |
126 iDefConnLock = aDefConnLock; |
125 iDefConnLock = aDefConnLock; |
127 iAESelectLock = aAESelectLock; |
126 iAESelectLock = aAESelectLock; |
128 iTzServerLock = aTzServerLock; |
|
129 } |
127 } |
130 |
128 |
131 ~TCLSICleanup() |
129 ~TCLSICleanup() |
132 { |
130 { |
133 iFs->Close(); |
131 iFs->Close(); |
136 iCs->Close(); |
134 iCs->Close(); |
137 iCsLock->Close(); |
135 iCsLock->Close(); |
138 iHeap->Close(); |
136 iHeap->Close(); |
139 iDefConnLock->Close(); |
137 iDefConnLock->Close(); |
140 iAESelectLock->Close(); |
138 iAESelectLock->Close(); |
141 iTzServerLock->Close(); |
|
142 } |
139 } |
143 private: |
140 private: |
144 RHeap* iHeap; |
141 RHeap* iHeap; |
145 RFs* iFs; |
142 RFs* iFs; |
146 RSocketServ* iSs; |
143 RSocketServ* iSs; |
147 RCommServ* iCs; |
144 RCommServ* iCs; |
148 RFastLock* iSsLock; |
145 RFastLock* iSsLock; |
149 RFastLock* iCsLock; |
146 RFastLock* iCsLock; |
150 RFastLock* iDefConnLock; |
147 RFastLock* iDefConnLock; |
151 RFastLock* iAESelectLock; |
148 RFastLock* iAESelectLock; |
152 RFastLock* iTzServerLock; |
|
153 }; |
149 }; |
154 |
150 |
155 |
151 |
156 class TFileTableCleanup |
152 class TFileTableCleanup |
157 { |
153 { |
455 int utime (const wchar_t* name, const struct utimbuf* filetimes, int& anErrno); |
451 int utime (const wchar_t* name, const struct utimbuf* filetimes, int& anErrno); |
456 |
452 |
457 int popen (const wchar_t* file, const wchar_t* cmd, const char* mode, int& anErrno); |
453 int popen (const wchar_t* file, const wchar_t* cmd, const char* mode, int& anErrno); |
458 int pclose (int aFid, int& anErrno); |
454 int pclose (int aFid, int& anErrno); |
459 IMPORT_C void CheckOrigins (wchar_t**& wenvp, int& aCount); |
455 IMPORT_C void CheckOrigins (wchar_t**& wenvp, int& aCount); |
460 IMPORT_C void freednssuffixes(if_dns_suffixes * suffixes); |
|
461 |
|
462 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
456 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
463 TInt SignalHandler(); |
457 TInt SignalHandler(); |
464 IMPORT_C void InitSignalHandler(); |
458 IMPORT_C void InitSignalHandler(); |
465 void RegisterExitNotification(TProcessId aPid); |
459 void RegisterExitNotification(TProcessId aPid); |
466 |
460 |
595 TInt GetSessionPath(TDes& aPath); |
589 TInt GetSessionPath(TDes& aPath); |
596 |
590 |
597 //Save the file server session path |
591 //Save the file server session path |
598 TInt SaveSessionPath(const TDesC& aPath); |
592 TInt SaveSessionPath(const TDesC& aPath); |
599 |
593 |
600 static void WaitForNRequest(TRequestStatus **aStatusArray, TInt aNum); |
|
601 |
|
602 static void WaitForNRequest(TRequestStatus aStatusArray[], TInt aNum); |
594 static void WaitForNRequest(TRequestStatus aStatusArray[], TInt aNum); |
603 |
595 |
604 private: |
596 private: |
605 //Helper function to read a record from the IAP table |
597 //Helper function to read a record from the IAP table |
606 void ReadRecordFromIapTableL(CCommsDbTableView* aView, TAccessPointRecord &aRecord); |
598 void ReadRecordFromIapTableL(CCommsDbTableView* aView, TAccessPointRecord &aRecord); |
619 |
611 |
620 // Helper function for the setdefaultif() API to restart the |
612 // Helper function for the setdefaultif() API to restart the |
621 // default RConnection with the new settings. |
613 // default RConnection with the new settings. |
622 TInt StartDefConnection(); |
614 TInt StartDefConnection(); |
623 |
615 |
624 // Helper function for doing an on-demand connection to RTz server |
|
625 TInt OnDemandTZServerConnection(); |
|
626 private: |
616 private: |
627 // NOTE: iCleanup should be the first member of CLSI, since iPrivateHeap |
617 // NOTE: iCleanup should be the first member of CLSI, since iPrivateHeap |
628 // will be destroyed from within iCleanup destructor. |
618 // will be destroyed from within iCleanup destructor. |
629 TCLSICleanup iCleanup; |
619 TCLSICleanup iCleanup; |
630 |
620 |
697 RArray<TASelectRequest> iASelectRequest; |
687 RArray<TASelectRequest> iASelectRequest; |
698 |
688 |
699 // Default connection settings, set/cleared using setdefaultif |
689 // Default connection settings, set/cleared using setdefaultif |
700 TConnPref* iDefConnPref; |
690 TConnPref* iDefConnPref; |
701 RTz iTzServer; |
691 RTz iTzServer; |
702 RFastLock iTzServerLock; |
|
703 TBool iIsRTzConnected; |
|
704 RPointerArray<CSocketDesc> iSocketArray; |
692 RPointerArray<CSocketDesc> iSocketArray; |
705 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
693 #ifdef SYMBIAN_OE_POSIX_SIGNALS |
706 // Signal handler thread |
694 // Signal handler thread |
707 RThread iSignalHandlerThread; |
695 RThread iSignalHandlerThread; |
708 RPipe iSignalReadPipe; |
696 RPipe iSignalReadPipe; |
852 #endif // SYMBIAN_OE_LIBRT |
840 #endif // SYMBIAN_OE_LIBRT |
853 |
841 |
854 #endif // SYMBIAN_OE_POSIX_SIGNALS |
842 #endif // SYMBIAN_OE_POSIX_SIGNALS |
855 public: |
843 public: |
856 |
844 |
857 IMPORT_C RTz & TZServer(TInt& aStatus); |
845 inline RTz & TZServer() |
858 |
846 { |
847 return iTzServer; |
|
848 } |
|
859 //ipc server session |
849 //ipc server session |
860 RIpcSession iIpcS; |
850 RIpcSession iIpcS; |
861 friend class RFileDesTransferSession; |
851 friend class RFileDesTransferSession; |
862 }; |
852 }; |
863 |
853 |
964 { |
954 { |
965 public: |
955 public: |
966 TUSockAddr() : TSockAddr(), iError(0) {} |
956 TUSockAddr() : TSockAddr(), iError(0) {} |
967 |
957 |
968 TUSockAddr(TAny* addr); // constructor form of Prepare |
958 TUSockAddr(TAny* addr); // constructor form of Prepare |
969 TUSockAddr(const TSockAddr& aSockAddr):TSockAddr(aSockAddr),iError(0){}; |
|
970 IMPORT_C TUSockAddr(const TAny* addr, TUint len); // constructor form of Set |
959 IMPORT_C TUSockAddr(const TAny* addr, TUint len); // constructor form of Set |
971 private: |
960 private: |
972 void Prepare(TAny* addr); |
961 void Prepare(TAny* addr); |
973 void Set(const TAny* addr, TUint len); |
962 void Set(const TAny* addr, TUint len); |
974 public: |
963 public: |