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