00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #if !defined (__TXUT_H__)
00017 #define __TXUT_H__
00018
00019 #if !defined(__BADESCA_H__)
00020 #include <badesca.h>
00021 #endif
00022 #if !defined(__MSVAPI_H__)
00023 #include <msvapi.h>
00024 #endif
00025
00026
00027
00028
00029 LOCAL_D const TInt KUidMsgTypeTextValue = 0x10005247;
00030 LOCAL_D const TUid KUidMsgTypeText = { KUidMsgTypeTextValue};
00031 LOCAL_D const TUid theTechnologyTypeUid = { KUidMsgTypeTextValue};
00032
00033 LOCAL_D const TUid KUidMsvMtmTextServerDLL ={0xE800005F};
00034 LOCAL_D const TUid KUidMsvMtmTextClientDLL ={0xE800005D};
00035 LOCAL_D const TUid KUidMsvMtmTextUiDLL ={0xE8000060};
00036 LOCAL_D const TUid KUidMsvMtmTextUiDataDLL ={0x10003C61};
00037 LOCAL_D const TUid KUidTextMtmVersion1 ={ KUidMsgTypeTextValue};
00038
00039
00040 LOCAL_D const TInt KUidTxtMTMSettingsValue = 0x1000525A;
00041 LOCAL_D const TUid KUidTxtMTMSettings={KUidTxtMTMSettingsValue};
00042 LOCAL_D const TInt KMaxTextMessageSize = 0xFFFF;
00043
00044
00045
00046
00047
00048
00049 class TTxtProgress
00050 {
00051 public:
00052 TInt iTotalMsgs;
00053 TInt iMsgsProcessed;
00054 TInt iErrorCode;
00055 TMsvId iNewId;
00056 };
00057
00058 typedef TPckgBuf<TTxtProgress> TTxtProgressBuf;
00059
00060
00061
00062
00063
00064 class TxtUtils
00065 {
00066 public:
00067
00068 IMPORT_C static void GetEntryFileNameL(TFileName& aFileName, TMsvEntry& aEntry);
00069 };
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 class CMsvStore;
00080 class TMTMTxtSettings
00081 {
00082 public:
00083 TFileName RootFolder() const;
00084 void SetRootFolder(const TDesC& aRootFolder);
00085 private:
00086 TFileName iRootFolder;
00087 };
00088
00089 inline void TMTMTxtSettings::SetRootFolder(const TDesC& aRootFolder)
00090 {
00091 iRootFolder = aRootFolder;
00092 }
00093
00094 inline TFileName TMTMTxtSettings::RootFolder() const
00095 {
00096 return iRootFolder;
00097 }
00098
00099 class CRepository;
00100
00105 class CMTMTxtSettings: public CBase
00106 {
00107 public:
00108 IMPORT_C static CMTMTxtSettings* NewL();
00109 ~CMTMTxtSettings();
00110
00111 IMPORT_C void LoadSettingsL(TMsvId aServiceId, TMTMTxtSettings& aSettings) const;
00112 IMPORT_C void SaveSettingsL(TMsvId aServiceId, const TMTMTxtSettings& aSettings);
00113 IMPORT_C void DeleteSettingsL(TMsvId aServiceId);
00114
00115 IMPORT_C TMsvId DefaultServiceL() const;
00116 IMPORT_C void SetDefaultServiceL(TMsvId aService);
00117 IMPORT_C void DeleteDefaultServiceSettingL();
00118
00119 private:
00120 void ConstructL();
00121 void CreateOrSetL(TUint aKey, const TDesC& aValue);
00122 void CreateOrSetL(TUint aKey, TInt aValue);
00123 TUint32 FindAccountL(TMsvId aService) const;
00124 TUint GetNextAccountSlotL();
00125 void DeleteSettingL(TUint32 settingId);
00126
00127 private:
00128 CRepository* iRepository;
00129 };
00130
00131 #endif