00001
00002
00003
00004
00005
00006
00007 #if !defined (__TXCLIENT_H__)
00008 #define __TXCLIENT_H__
00009
00010
00011 #include <e32base.h>
00012 #include <badesca.h>
00013 #include <msvapi.h>
00014 #include <mtclbase.h>
00015 #include <txut.h>
00016
00017 const TUint KAddresseeListResizeGranularity = 5;
00018
00019
00020
00021
00022
00023
00024 class CTextMtmClient : public CBaseMtm
00025 {
00026 public:
00027
00028 IMPORT_C static CTextMtmClient* NewL(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aMsvSession);
00029 ~CTextMtmClient();
00030
00031 public:
00032
00033
00034
00035 virtual void SaveMessageL();
00036 virtual void LoadMessageL();
00037
00038
00039 virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus);
00040 virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus);
00041
00042
00043 virtual TMsvPartList ValidateMessage(TUint aPartList);
00044 virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList);
00045
00046
00047 virtual void AddAddresseeL(const TDesC& aRealAddress);
00048 virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias);
00049 virtual void RemoveAddressee(TInt aIndex);
00050
00051
00052 virtual TInt QueryCapability(TUid aCapability, TInt& aResponse);
00053 virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter);
00054 virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus);
00055
00056 void CreateAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus);
00057 void CreateAttachmentL(RFile& aFile, const TDesC8& aMimeType, TRequestStatus& aStatus);
00058 void CreateLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus);
00059 void CreateMessageAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus);
00060
00061 TMsvId DefaultServiceL() const;
00062 void RemoveDefaultServiceL();
00063 void ChangeDefaultServiceL(const TMsvId& aService);
00064 public:
00065
00066 TMTMTxtSettings& TxtSettings();
00067 CMTMTxtSettings& Settings();
00068 protected:
00069
00070 virtual void ContextEntrySwitched();
00071
00072 protected:
00073 CTextMtmClient(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aMsvSession);
00074 void ConstructL();
00075
00076 private:
00077 TMTMTxtSettings iTxtSettings;
00078 CMTMTxtSettings* iSettings;
00079 };
00080
00081
00082
00083
00084
00085
00086
00087 inline void CTextMtmClient::AddAddresseeL(const TDesC& ) {};
00088 inline void CTextMtmClient::AddAddresseeL(const TDesC& , const TDesC& ) {};
00089 inline void CTextMtmClient::RemoveAddressee(TInt ) {};
00090 inline TMTMTxtSettings& CTextMtmClient::TxtSettings()
00091 {
00092 return iTxtSettings;
00093 }
00094
00095 inline CMTMTxtSettings& CTextMtmClient::Settings()
00096 {
00097 return *iSettings;
00098 }
00099 #endif // __TXCLIENT_H__