53 IMPORT_C static CMtmDllInfo* NewL(const TDesC& aHumanReadableName,const TUidType& aUidType,const TDesC& aFilename,TInt aEntryPointOrdinalNumber,const TVersion aVersion); |
53 IMPORT_C static CMtmDllInfo* NewL(const TDesC& aHumanReadableName,const TUidType& aUidType,const TDesC& aFilename,TInt aEntryPointOrdinalNumber,const TVersion aVersion); |
54 IMPORT_C static CMtmDllInfo* NewL(const CMtmDllInfo& aMtmDllInfo); |
54 IMPORT_C static CMtmDllInfo* NewL(const CMtmDllInfo& aMtmDllInfo); |
55 IMPORT_C static CMtmDllInfo* NewL(RReadStream& aStream); |
55 IMPORT_C static CMtmDllInfo* NewL(RReadStream& aStream); |
56 IMPORT_C ~CMtmDllInfo(); |
56 IMPORT_C ~CMtmDllInfo(); |
57 IMPORT_C void SetHumanReadableNameL(const TDesC& aHumanReadableName); |
57 IMPORT_C void SetHumanReadableNameL(const TDesC& aHumanReadableName); |
58 inline TPtrC HumanReadableName() const; |
58 inline TPtrC HumanReadableName() const{return iHumanReadableName->Des();}; |
59 IMPORT_C void InternalizeL(RReadStream& aStream); |
59 IMPORT_C void InternalizeL(RReadStream& aStream); |
60 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept |
60 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept |
61 IMPORT_C TBool operator==(const CMtmDllInfo& aMtmDllInfo) const; |
61 IMPORT_C TBool operator==(const CMtmDllInfo& aMtmDllInfo) const; |
62 void SetMessagingCapability(TBool aCapability); |
62 void SetMessagingCapability(TBool aCapability); |
63 void SetSendBodyCapability(TBool aCapability); |
63 void SetSendBodyCapability(TBool aCapability); |
127 IMPORT_C static CMtmGroupData* NewL(const CMtmGroupData& aMtmGroupData); |
127 IMPORT_C static CMtmGroupData* NewL(const CMtmGroupData& aMtmGroupData); |
128 IMPORT_C static CMtmGroupData* NewL(RReadStream& aStream); |
128 IMPORT_C static CMtmGroupData* NewL(RReadStream& aStream); |
129 IMPORT_C ~CMtmGroupData(); |
129 IMPORT_C ~CMtmGroupData(); |
130 IMPORT_C void InternalizeL(RReadStream& aStream); |
130 IMPORT_C void InternalizeL(RReadStream& aStream); |
131 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept |
131 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept |
132 inline TUid MtmTypeUid() const; |
132 inline TUid MtmTypeUid() const{return iMtmTypeUid;}; |
133 inline TUid TechnologyTypeUid() const; |
133 inline TUid TechnologyTypeUid() const{return iTechnologyTypeUid;}; |
134 IMPORT_C const CMtmDllInfoArray& MtmDllInfoArray() const; |
134 IMPORT_C const CMtmDllInfoArray& MtmDllInfoArray() const; |
135 IMPORT_C const TCapabilitySet& GetMtmRequiredCapabilities() const; |
135 IMPORT_C const TCapabilitySet& GetMtmRequiredCapabilities() const; |
136 IMPORT_C TBool operator==(const CMtmGroupData& aMtmGroupData) const; |
136 IMPORT_C TBool operator==(const CMtmGroupData& aMtmGroupData) const; |
137 private: |
137 private: |
138 CMtmGroupData(TUid aMtmTypeUid, TUid aTechnologyTypeUid, CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); |
138 CMtmGroupData(TUid aMtmTypeUid, TUid aTechnologyTypeUid, CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); |
173 { |
173 { |
174 public: |
174 public: |
175 IMPORT_C static CRegisteredMtmDll* NewL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); |
175 IMPORT_C static CRegisteredMtmDll* NewL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); |
176 IMPORT_C ~CRegisteredMtmDll(); |
176 IMPORT_C ~CRegisteredMtmDll(); |
177 |
177 |
178 inline TUid MtmTypeUid() const; |
178 inline TUid MtmTypeUid() const{return iMtmTypeUid;}; |
179 inline TUid TechnologyTypeUid() const; |
179 inline TUid TechnologyTypeUid() const{return iTechnologyTypeUid;}; |
180 inline const CMtmDllInfo& MtmDllInfo() const; |
180 inline const CMtmDllInfo& MtmDllInfo() const{return *iMtmDllInfo;}; |
181 |
181 |
182 inline TInt MtmDllRefCount() const; |
182 inline TInt MtmDllRefCount() const{return iMtmDllRefCount;}; |
183 |
183 |
184 IMPORT_C TInt GetLibrary(RFs& aFs,RLibrary& aMtmDllLibrary); // Increments reference count if successful or returns error |
184 IMPORT_C TInt GetLibrary(RFs& aFs,RLibrary& aMtmDllLibrary); // Increments reference count if successful or returns error |
185 IMPORT_C void ReleaseLibrary(); // Decrements access count |
185 IMPORT_C void ReleaseLibrary(); // Decrements access count |
186 // Should be called from destructor of any objects created from the library |
186 // Should be called from destructor of any objects created from the library |
187 private: |
187 private: |
231 */ |
231 */ |
232 { |
232 { |
233 public: |
233 public: |
234 IMPORT_C ~CMtmDllRegistry(); |
234 IMPORT_C ~CMtmDllRegistry(); |
235 |
235 |
236 inline TInt NumRegisteredMtmDlls() const; |
236 inline TInt NumRegisteredMtmDlls() const{return iRegisteredMtmDllArray.Count();}; |
237 IMPORT_C TUid MtmTypeUid(TInt anIndex) const; |
237 IMPORT_C TUid MtmTypeUid(TInt anIndex) const; |
238 |
238 |
239 inline TBool IsPresent(TUid aMtmTypeUid) const; |
239 inline TBool IsPresent(TUid aMtmTypeUid) const; |
240 IMPORT_C TUid TechnologyTypeUid(TUid aMtmTypeUid) const; |
240 IMPORT_C TUid TechnologyTypeUid(TUid aMtmTypeUid) const; |
241 IMPORT_C const CMtmDllInfo& RegisteredMtmDllInfo(TUid aMtmTypeUid) const; |
241 IMPORT_C const CMtmDllInfo& RegisteredMtmDllInfo(TUid aMtmTypeUid) const; |
260 CRegisteredMtmDllArray iRegisteredMtmDllArray; // Inline CArray, OK because no NewL(); |
260 CRegisteredMtmDllArray iRegisteredMtmDllArray; // Inline CArray, OK because no NewL(); |
261 TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; |
261 TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; |
262 }; |
262 }; |
263 |
263 |
264 |
264 |
265 #include <msvreg.inl> |
265 inline TBool CMtmDllRegistry::IsPresent(TUid aMtmTypeUid) const |
|
266 /** Tests if the MTM with the specified UID is registered. |
|
267 |
|
268 @param aMtmTypeUid UID of MTM to check |
|
269 @return ETrue if the specified MTM in registered, else EFalse */ |
|
270 { |
|
271 return MtmTypeUidToIndex(aMtmTypeUid)<iRegisteredMtmDllArray.Count(); |
|
272 } |
|
273 |
|
274 |
|
275 |
266 |
276 |
267 #endif |
277 #endif |