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 "../../Util/inc/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
00030
00031 ~CTextMtmClient();
00032
00033 public:
00034
00035
00036 virtual void SaveMessageL();
00037 virtual void LoadMessageL();
00038
00039
00040 virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus);
00041 virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus);
00042
00043
00044 virtual TMsvPartList ValidateMessage(TUint aPartList);
00045 virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList);
00046
00047
00048 virtual void AddAddresseeL(const TDesC& aRealAddress);
00049 virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias);
00050 virtual void RemoveAddressee(TInt aIndex);
00051
00052
00053 virtual TInt QueryCapability(TUid aCapability, TInt& aResponse);
00054 virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter);
00055 virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus);
00056
00057 void CreateAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus);
00058 void CreateAttachmentL(RFile& aFile, const TDesC8& aMimeType, TRequestStatus& aStatus);
00059 void CreateLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus);
00060 void CreateMessageAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus);
00061
00062 TMsvId DefaultServiceL() const;
00063 void RemoveDefaultServiceL();
00064 void ChangeDefaultServiceL(const TMsvId& aService);
00065
00066 virtual void SetSubjectL(const TDesC &aSubject);
00067 virtual const TPtrC SubjectL() const;
00068 public:
00069
00070 TMTMTxtSettings& TxtSettings();
00071 CMTMTxtSettings& Settings();
00072 protected:
00073
00074 virtual void ContextEntrySwitched();
00075
00076 protected:
00077 CTextMtmClient(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aMsvSession);
00078 void ConstructL();
00079
00080 private:
00081 TMTMTxtSettings iTxtSettings;
00082 CMTMTxtSettings* iSettings;
00083 };
00084
00085
00086
00087
00088
00089
00090
00091 void CTextMtmClient::AddAddresseeL(const TDesC& ) {};
00092 void CTextMtmClient::AddAddresseeL(const TDesC& , const TDesC& ) {};
00093 void CTextMtmClient::RemoveAddressee(TInt ) {};
00094 TMTMTxtSettings& CTextMtmClient::TxtSettings()
00095 {
00096 return iTxtSettings;
00097 }
00098
00099 CMTMTxtSettings& CTextMtmClient::Settings()
00100 {
00101 return *iSettings;
00102 }
00103 #endif // __TXCLIENT_H__