1.1 --- a/epoc32/include/mw/msvstd.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/msvstd.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -11,16 +11,19 @@
1.16 // Contributors:
1.17 //
1.18 // Description:
1.19 +// MSVSTD.H
1.20 //
1.21 -
1.22 +/**
1.23 + * @file
1.24 + * @publishedAll
1.25 + * @released
1.26 + */
1.27 #ifndef __MSVSTD_H__
1.28 #define __MSVSTD_H__
1.29
1.30 -
1.31 -
1.32 -
1.33 #include <e32base.h>
1.34 #include <s32file.h>
1.35 +#include <msvstd.hrh>
1.36
1.37 /**
1.38 Specifies an entry in the Message Server index.
1.39 @@ -163,6 +166,8 @@
1.40 /** This method sets bit 32 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
1.41 inline void SetLocallyDeleted(TBool aLocallyDeleted);
1.42 inline TBool LocallyDeleted() const;
1.43 + inline void SetVisibleFolderFlag(TBool aReadOnly);
1.44 + inline TBool VisibleFolderFlag() const;
1.45
1.46 IMPORT_C TBool PendingConditions() const;
1.47 IMPORT_C void SetPendingConditions(TBool aPendingConditions);
1.48 @@ -170,18 +175,9 @@
1.49 IMPORT_C TInt32 MtmData1() const;
1.50 IMPORT_C TInt32 MtmData2() const;
1.51 IMPORT_C TInt32 MtmData3() const;
1.52 -
1.53 - /**
1.54 - @internalTechnology
1.55 - */
1.56 +
1.57 IMPORT_C void SetMtmData1(TInt32 aMtmData);
1.58 - /**
1.59 - @internalTechnology
1.60 - */
1.61 IMPORT_C void SetMtmData2(TInt32 aMtmData);
1.62 - /**
1.63 - @internalTechnology
1.64 - */
1.65 IMPORT_C void SetMtmData3(TInt32 aMtmData);
1.66 //
1.67 protected:
1.68 @@ -249,6 +245,8 @@
1.69 //
1.70 private:
1.71 //
1.72 +
1.73 +
1.74 friend class CMsvEntry;
1.75 friend class CMsvServer;
1.76 friend class CMsvServerEntry;
1.77 @@ -264,7 +262,36 @@
1.78 friend class CMsvDelete;
1.79 friend class CMsvIndexContext;
1.80 friend class CMsvEntryArray;
1.81 - //
1.82 +friend class CMsvIndexAdapter;
1.83 +friend class CMsvDBAdapter;
1.84 +friend class TSearchSortDbWrapper;
1.85 +
1.86 +#if (defined SYMBIAN_MESSAGESTORE_UNIT_TESTCODE)
1.87 +friend class CTestIndexAdapter;
1.88 +friend class CTestDbAdapter;
1.89 +friend class CTestVisibleFolder;
1.90 +friend class CTestIndexTableEntry;
1.91 +friend class CTestEntryFreePool;
1.92 +friend class CTestIndexContext;
1.93 +friend class CTestMsvServer;
1.94 +friend class CTestMsvEntry;
1.95 +friend class CTestSearchSortCacheEntry;
1.96 +friend class CTestSearchSortCacheManager;
1.97 +friend class CTestSearchSortDeltaCache;
1.98 +friend class CTestSearchSortOperation;
1.99 +friend class CTestSearchSortDBadapter;
1.100 +friend class CTestSearchSortCacheManager;
1.101 +friend class CTestSearchSortDeltaCache;
1.102 +friend class CTestHeaderSearchSortOperation;
1.103 +friend class CTestHeaderEntry;
1.104 +#endif
1.105 +
1.106 +#if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)
1.107 + friend class CMsvVersion0Version1Converter;
1.108 +#if (defined SYMBIAN_MESSAGESTORE_UNIT_TESTCODE)
1.109 + friend class CTestConverterDBAdapter;
1.110 +#endif
1.111 +#endif
1.112 private:
1.113 //
1.114 enum { KMsvEntryPriorityMask= 0x00000003,
1.115 @@ -292,7 +319,10 @@
1.116 KMsvEntryPendingConditionsFlag= 0x00800000,
1.117 KMsvEntryTemporaryFlags= 0xFF000000,
1.118 KMsvEntryConnectedFlag= 0x01000000,
1.119 - KMsvEntryPendingDeleteFlag= 0x02000000};
1.120 + KMsvEntryPendingDeleteFlag= 0x02000000,
1.121 + KMsvVisibleFolderNodeFlag= 0x04000000
1.122 + };
1.123 +
1.124 };
1.125 enum
1.126 {
1.127 @@ -303,6 +333,11 @@
1.128
1.129 const TUint KMsvSendingStateShift=0x11; // Places to shift sending state
1.130
1.131 +#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
1.132 + const TInt KDriveMask = 0x0fffffff;
1.133 + const TInt KCurrentDriveId = 1;
1.134 +#endif
1.135 +
1.136 /** Defines sending state flags.
1.137 @publishedAll
1.138 @released
1.139 @@ -336,6 +371,12 @@
1.140
1.141 const TUint KMsvSendStateLast = KMsvSendStateNotApplicable;
1.142 const TUint KMsvSendStateMax = 0x0F;
1.143 +// Message Database Version.
1.144 +#if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)
1.145 +const TUint KCurrentDatabaseVersion = 2;
1.146 +#else
1.147 +const TUint KCurrentDatabaseVersion = 1;
1.148 +#endif
1.149
1.150 /** Supplies values for bitmasks that allows the rapid setting or clearing of a
1.151 number of TMsvEntry fields.
1.152 @@ -611,6 +652,102 @@
1.153 KMsvIndexRestore = -7004
1.154 };
1.155
1.156 +#if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)
1.157 +
1.158 +enum EFieldType
1.159 +/**
1.160 +Allowed field types.
1.161 +This class is also used at the server side.
1.162 +
1.163 +@publishedAll
1.164 +@released
1.165 +*/
1.166 + {
1.167 + EIntegerField,
1.168 + ETextField,
1.169 + EDateField
1.170 + };
1.171 +
1.172 +
1.173 +
1.174 +// Common class used by both client and server.
1.175 +class CFieldPair: public CBase
1.176 +/**
1.177 +Allowed field types.
1.178 +This class is also used at the server side.
1.179 +
1.180 +@publishedAll
1.181 +@released
1.182 +*/
1.183 + {
1.184 +public:
1.185 + ~CFieldPair()
1.186 + {
1.187 + if(iFieldName)
1.188 + {
1.189 + delete iFieldName;
1.190 + }
1.191 + if(iFieldTextValue)
1.192 + {
1.193 + delete iFieldTextValue;
1.194 + }
1.195 + }
1.196 + HBufC* iFieldName; // Column name
1.197 + EFieldType iFieldType; // Column type
1.198 + TInt64 iFieldNumValue; // Column value in number
1.199 + HBufC* iFieldTextValue; // Column value in text
1.200 + };
1.201 +
1.202 +
1.203 +
1.204 +class CHeaderFields: public CBase
1.205 + {
1.206 +public:
1.207 + ~CHeaderFields()
1.208 + {
1.209 + iFieldPairList.ResetAndDestroy();
1.210 + }
1.211 + RPointerArray<CFieldPair> iFieldPairList;
1.212 + TUid iUid;
1.213 + };
1.214 +
1.215 +
1.216 +/*
1.217 +// Used for CMsvEntry::ReadDBStoreL() and CMsvEntry::ReadDBStoreL()
1.218 +// Used for CMsvServerEntry::ReadDBStoreL() and CMsvServerEntry::ReadDBStoreL()
1.219 +
1.220 +@publishedAll
1.221 +@released
1.222 +*/
1.223 +
1.224 +enum TEntryStoreType
1.225 + {
1.226 + EHeaderEntry,
1.227 + EBodyEntry,
1.228 + EUnknownEntry,
1.229 + EHeaderAndBodyEntry
1.230 + };
1.231 +
1.232 +
1.233 +#endif // #if (defined SYMBIAN_MESSAGESTORE_HEADER_BODY_USING_SQLDB)
1.234 +
1.235 +/**
1.236 +Temporary ID used for testing purpose
1.237 +@publishedAll
1.238 +@released
1.239 +@see TMsvId
1.240 +@see KMsvTempIndexEntryIdValue
1.241 +*/
1.242 +const TMsvId KMsvTempIndexEntryId = KMsvTempIndexEntryIdValue;//1
1.243 +
1.244 +/**
1.245 +@publishedAll
1.246 +@released
1.247 +@see TMsvId
1.248 +*/
1.249 +const TMsvId KFirstFreeEntryId=0x100000;
1.250 +
1.251 +
1.252 #include <msvstd.inl>
1.253
1.254 #endif