epoc32/include/commsdat.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// 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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// Constants for use in storing comms data via CommsDat
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
/**
williamr@2
    21
 @file
williamr@2
    22
 @publishedAll
williamr@2
    23
 @released
williamr@2
    24
*/
williamr@2
    25
williamr@2
    26
williamr@2
    27
#if (!defined COMMSDAT_H)
williamr@2
    28
#define       COMMSDAT_H
williamr@2
    29
williamr@2
    30
#include <comms-infras/metatype.h>
williamr@2
    31
#include <e32property.h>
williamr@2
    32
williamr@2
    33
williamr@2
    34
namespace Meta
williamr@2
    35
    {
williamr@2
    36
williamr@2
    37
	/**
williamr@2
    38
	Visitor factory functions
williamr@2
    39
	@internalComponent
williamr@2
    40
	*/
williamr@2
    41
    MMetaType* TMDBNumBaseVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    42
   	/**     
williamr@2
    43
   	@internalComponent
williamr@2
    44
   	*/
williamr@2
    45
    MMetaType* TMDBTextBaseVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    46
    /**     
williamr@2
    47
   	@internalComponent
williamr@2
    48
   	*/
williamr@2
    49
    MMetaType* TMDBBinBaseVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    50
    /**     
williamr@2
    51
   	@internalComponent
williamr@2
    52
   	*/
williamr@2
    53
    MMetaType* TMDBDeprecatedVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    54
	/**
williamr@2
    55
    @publishedPartner
williamr@2
    56
    @released
williamr@2
    57
    */
williamr@2
    58
    IMPORT_C MMetaType* TMDBNumVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    59
    /**
williamr@2
    60
    @publishedPartner
williamr@2
    61
    @released
williamr@2
    62
    */
williamr@2
    63
    IMPORT_C MMetaType* TMDBLinkNumVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    64
    /**
williamr@2
    65
    @publishedPartner
williamr@2
    66
    @released
williamr@2
    67
    */
williamr@2
    68
    IMPORT_C MMetaType* TMDBTextVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    69
    /**
williamr@2
    70
    @publishedPartner
williamr@2
    71
    @released
williamr@2
    72
    */
williamr@2
    73
    IMPORT_C MMetaType* TMDBMedTextVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    74
    /**
williamr@2
    75
    @publishedPartner
williamr@2
    76
    @released
williamr@2
    77
    */
williamr@2
    78
    IMPORT_C MMetaType* TMDBLongTextVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    79
    /**
williamr@2
    80
    @publishedPartner
williamr@2
    81
    @released
williamr@2
    82
    */
williamr@2
    83
    IMPORT_C MMetaType* TMDBBinVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    84
    /**
williamr@2
    85
    @publishedPartner
williamr@2
    86
    @released
williamr@2
    87
    */
williamr@2
    88
    IMPORT_C MMetaType* TMDBLinkVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    89
    /**
williamr@2
    90
    @publishedPartner
williamr@2
    91
    @released
williamr@2
    92
    */
williamr@2
    93
    IMPORT_C MMetaType* TMDBRecordSetVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    94
    /**
williamr@2
    95
    @publishedPartner
williamr@2
    96
    @released
williamr@2
    97
    */
williamr@2
    98
    IMPORT_C MMetaType* TMDBGenericRecordVisitorFactoryL(const TAny* mem, const TAny* data);
williamr@2
    99
williamr@2
   100
    }
williamr@2
   101
williamr@2
   102
williamr@2
   103
namespace CommsDat
williamr@2
   104
{
williamr@2
   105
williamr@2
   106
/**
williamr@2
   107
Use this constant for Debug panic calls
williamr@2
   108
williamr@2
   109
@publishedAll
williamr@2
   110
*/
williamr@2
   111
_LIT(KCommsDatName,"CommsDat");
williamr@2
   112
williamr@2
   113
/**
williamr@2
   114
Use this constant for Debug panic calls
williamr@2
   115
williamr@2
   116
@publishedAll
williamr@2
   117
*/
williamr@2
   118
enum
williamr@2
   119
	{
williamr@2
   120
	ECommitBeforeOpenTransaction = 1,
williamr@2
   121
	ERollBackBeforeOpenTransaction = 2,
williamr@2
   122
	ESessionClosed = 3,
williamr@2
   123
    EWrongAPPrioritySelPolRecord = 4,
williamr@2
   124
    EWrongIAPServiceType = 5
williamr@2
   125
	};
williamr@2
   126
	
williamr@2
   127
using namespace Meta;
williamr@2
   128
williamr@2
   129
//////////////////////////////////////////////////
williamr@2
   130
// VERSION INFO
williamr@2
   131
//
williamr@2
   132
williamr@2
   133
/**
williamr@2
   134
Use this constant when starting a session to ask to use the latest version of the data set
williamr@2
   135
Do not use this constant if want option to keep using particular version after update
williamr@2
   136
Using this constant will require the client to keep up to date with any changes in the current dataset
williamr@2
   137
Use specific version constants to avoid changing until a deprecated version is no longer supported.
williamr@2
   138
williamr@2
   139
@publishedAll
williamr@2
   140
*/
williamr@2
   141
#define KCDLatestVersion            TVersion(0,0,0)
williamr@2
   142
williamr@2
   143
williamr@2
   144
/**
williamr@2
   145
Versions of the dataset in use
williamr@2
   146
NB These versions will change as data set is updated
williamr@2
   147
All versions apart from the one defined as KCDCurrentVersion are deprecated
williamr@2
   148
*/
williamr@2
   149
williamr@2
   150
/*
williamr@2
   151
Initial Version 
williamr@2
   152
@publishedAll
williamr@2
   153
*/
williamr@2
   154
williamr@2
   155
#define KCDVersion1_1               TVersion(1,1,1)
williamr@2
   156
williamr@2
   157
#ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
williamr@2
   158
/**
williamr@2
   159
Some elements in Version KCDVersion1_1 now deprecated
williamr@2
   160
These elements will be mapped if the client starts a session with KCDVersion1_1
williamr@2
   161
They will be ignored or rejected as not supported if client starts a session with 
williamr@2
   162
KCDVersion1_2 or KCDLatestVersion
williamr@2
   163
williamr@2
   164
@publishedAll
williamr@2
   165
*/
williamr@2
   166
#define KCDVersion1_2               TVersion(1,2,1)
williamr@2
   167
#endif
williamr@2
   168
/**
williamr@2
   169
The version of the dataset supported by default
williamr@2
   170
NB This version will change as data set is updated
williamr@2
   171
williamr@2
   172
@publishedAll
williamr@2
   173
*/
williamr@2
   174
#ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
williamr@2
   175
williamr@2
   176
#define KCDCurrentVersion           KCDVersion1_2
williamr@2
   177
williamr@2
   178
#else
williamr@2
   179
williamr@2
   180
#define KCDCurrentVersion           KCDVersion1_1
williamr@2
   181
williamr@2
   182
#endif
williamr@2
   183
williamr@2
   184
williamr@2
   185
williamr@2
   186
williamr@2
   187
////////////////////////////////////////////////////
williamr@2
   188
//  Attribute Flags
williamr@2
   189
//
williamr@2
   190
williamr@2
   191
/**
williamr@2
   192
Access control attribute flags.
williamr@2
   193
When these are SET in the mask the attribute is obeyed
williamr@2
   194
When they are CLEARED from the mask, the attribute is ignored
williamr@2
   195
By default attributes are obeyed.
williamr@2
   196
williamr@2
   197
@publishedAll
williamr@2
   198
*/
williamr@2
   199
typedef enum
williamr@2
   200
{
williamr@2
   201
  ECDNoWriteButDelete = 0x0000010,     // R/W Read Only but deleteable      Caller should explicitly choose to modify
williamr@2
   202
                                       //                                   Enforced by convention only, not with Platform Security
williamr@2
   203
  ECDHidden           = 0x0000020,     // R/W Read-Write Hidden data        Not policed - hides public utility info such as default values
williamr@2
   204
                                       //                                   Enforced by convention only, not with Platform Security  
williamr@2
   205
  ECDPrivate          = 0x0000040,     // R/W Read-Write Private data       For sensitive user data such as passwords
williamr@2
   206
                                       //                                   Policed at storage server API with platsec capability
williamr@2
   207
  ECDProtectedWrite   = 0x0000080,     // W   Write-Protected data          To allow data to be read only to most clients but modifiable by a few privileged clients
williamr@2
   208
                                       //                                   Policed at storage server API with platsec capability
williamr@2
   209
} TCDAttributeFlags;
williamr@2
   210
williamr@2
   211
williamr@2
   212
/////////////////////////////////////////////////////
williamr@2
   213
// Field types
williamr@2
   214
//
williamr@2
   215
/**
williamr@2
   216
@publishedPartner
williamr@2
   217
@released
williamr@2
   218
*/
williamr@2
   219
typedef enum
williamr@2
   220
{
williamr@2
   221
	EText,          ///< Text field - descriptor with a maximum length of 50 unicode characters.
williamr@2
   222
 	EDesC8,         ///< Buffer of TUInt8. Maximum length is 1024 * 8. 
williamr@2
   223
 	EUint32,		///< Unsigned 32 bit integer field.
williamr@2
   224
 	EInt,			///< Signed integer field
williamr@2
   225
 	EBool,			///< Boolean field
williamr@2
   226
 	EMedText,       ///< Text field - descriptor with a maximum length of 256 unicode characters.
williamr@2
   227
 	ELongText, 		///< Text field - descriptor with a maximum length of 1024 unicode characters.
williamr@2
   228
    ELink			///< This field is an integer that identifies a record in another table.
williamr@2
   229
williamr@2
   230
} TCDFieldValueTypes;
williamr@2
   231
williamr@2
   232
/**
williamr@2
   233
@publishedPartner
williamr@2
   234
@released
williamr@2
   235
*/
williamr@2
   236
const TInt KMaxTextLength		= 50; 		///< Specifies the max length (characters) for short text.
williamr@2
   237
/**
williamr@2
   238
@publishedPartner
williamr@2
   239
@released
williamr@2
   240
*/
williamr@2
   241
const TInt KMaxMedTextLength	= 255; 		///< Specifies the max length (characters) for medium text.
williamr@2
   242
/**
williamr@2
   243
@publishedPartner
williamr@2
   244
@released
williamr@2
   245
*/
williamr@2
   246
const TInt KMaxLongTextLength	= 1024;		///< Specifies the max length (characters) for long text.
williamr@2
   247
/**
williamr@2
   248
@publishedPartner
williamr@2
   249
@released
williamr@2
   250
*/
williamr@2
   251
const TInt KMaxNumLength		= 1;		///< Specifies the max length for an integer and a boolean.
williamr@2
   252
williamr@2
   253
// Length override on a normal text field
williamr@2
   254
/**
williamr@2
   255
@publishedPartner
williamr@2
   256
@released
williamr@2
   257
*/
williamr@2
   258
const TInt KShortTextLength		= 32;
williamr@2
   259
williamr@2
   260
////////////////////////////////////////////////////
williamr@2
   261
// Masks for Element Type info
williamr@2
   262
//
williamr@2
   263
williamr@2
   264
williamr@2
   265
/**
williamr@2
   266
Mask to use to hide attribute reserved bits
williamr@2
   267
williamr@2
   268
@publishedAll
williamr@2
   269
*/
williamr@2
   270
#define KCDMaskHideAttrAndRes       0xffffff00
williamr@2
   271
williamr@2
   272
williamr@2
   273
/**
williamr@2
   274
Mask to use to show reserved bits
williamr@2
   275
williamr@2
   276
@publishedAll
williamr@2
   277
*/
williamr@2
   278
#define KCDMaskShowRes              0x8000000f
williamr@2
   279
williamr@2
   280
williamr@2
   281
/**
williamr@2
   282
Mask to use to hide reserved bits
williamr@2
   283
williamr@2
   284
@publishedAll
williamr@2
   285
*/
williamr@2
   286
#define KCDMaskHideRes              0x7ffffff0
williamr@2
   287
williamr@2
   288
williamr@2
   289
/**
williamr@2
   290
T x x   Mask to show Table Type info
williamr@2
   291
williamr@2
   292
@publishedAll
williamr@2
   293
*/
williamr@2
   294
#define KCDMaskShowRecordType       0x7f800000
williamr@2
   295
williamr@2
   296
williamr@2
   297
/**
williamr@2
   298
x C x   Mask to show Column Type 
williamr@2
   299
williamr@2
   300
@publishedAll
williamr@2
   301
*/
williamr@2
   302
#define KCDMaskShowFieldType        0x007f0000
williamr@2
   303
williamr@2
   304
williamr@2
   305
/**
williamr@2
   306
T C x   Mask to show Table and Column Type 
williamr@2
   307
williamr@2
   308
@publishedAll
williamr@2
   309
*/
williamr@2
   310
#define KCDMaskShowType             0x7fff0000
williamr@2
   311
williamr@2
   312
williamr@2
   313
/**
williamr@2
   314
T x R   Mask to show Record id
williamr@2
   315
williamr@2
   316
@publishedAll - don't use this.  Replace with KCDMaskShowRecordId
williamr@2
   317
*/
williamr@2
   318
#define KCDMaskShowInstance         0x0000ff00
williamr@2
   319
williamr@2
   320
williamr@2
   321
/**
williamr@2
   322
T x R   Mask to show Record id
williamr@2
   323
Use in place of KCDMaskShowInstance
williamr@2
   324
@publishedAll
williamr@2
   325
*/
williamr@2
   326
#define KCDMaskShowRecordId         0x0000ff00
williamr@2
   327
williamr@2
   328
williamr@2
   329
/**
williamr@2
   330
T C R   Mask to show Field instance without attributes or reserved bits
williamr@2
   331
williamr@2
   332
@publishedAll
williamr@2
   333
*/
williamr@2
   334
#define KCDMaskShowField            0x7fffff00
williamr@2
   335
williamr@2
   336
williamr@2
   337
/**
williamr@2
   338
T C R   Mask for Central Repository to find a single field
williamr@2
   339
williamr@2
   340
@internalComponent
williamr@2
   341
*/
williamr@2
   342
#define KCDMaskFindSingleField		0x7FFFFFFE
williamr@2
   343
williamr@2
   344
/**
williamr@2
   345
T x R   Mask to show Record Type and Record Id without column type, attributes or reserved bits
williamr@2
   346
williamr@2
   347
@publishedAll
williamr@2
   348
*/
williamr@2
   349
#define KCDMaskShowRecordTypeAndId  (KCDMaskShowRecordType | KCDMaskShowRecordId)
williamr@2
   350
williamr@2
   351
/**
williamr@2
   352
x C R   Mask to show Column Type and Record Id without Record type, attributes or reserved bits
williamr@2
   353
williamr@2
   354
@publishedAll
williamr@2
   355
*/
williamr@2
   356
#define KCDMaskShowColumnTypeAndRecordId  (KCDMaskShowFieldType |  KCDMaskShowRecordId)
williamr@2
   357
williamr@2
   358
williamr@2
   359
/**
williamr@2
   360
Mask to show Attributes
williamr@2
   361
williamr@2
   362
@publishedAll
williamr@2
   363
*/
williamr@2
   364
#define KCDMaskShowAttributes       0x000000f0
williamr@2
   365
williamr@2
   366
williamr@2
   367
/**
williamr@2
   368
Mask for all attribute settings that apply to read and write operations
williamr@2
   369
see TCDAttributeFlags
williamr@2
   370
williamr@2
   371
  ECDNoWriteButDelete = 0x0000010                             
williamr@2
   372
  ECDHidden           = 0x0000020
williamr@2
   373
  ECDPrivate          = 0x0000040
williamr@2
   374
  ECDProtectedWrite   = 0x0000080
williamr@2
   375
williamr@2
   376
@publishedPartner
williamr@2
   377
@released
williamr@2
   378
*/
williamr@2
   379
#define KCDMaskShowReadWriteAttributes  (ECDNoWriteButDelete |ECDHidden | ECDPrivate | ECDProtectedWrite)
williamr@2
   380
williamr@2
   381
/**
williamr@2
   382
Mask for all attribute settings that apply to read operations
williamr@2
   383
see TCDAttributeFlags
williamr@2
   384
                          
williamr@2
   385
  ECDHidden           = 0x0000020
williamr@2
   386
  ECDPrivate          = 0x0000040
williamr@2
   387
  
williamr@2
   388
@publishedPartner
williamr@2
   389
@released  
williamr@2
   390
*/
williamr@2
   391
#define KCDMaskShowReadAttributes       (ECDHidden| ECDPrivate)     
williamr@2
   392
williamr@2
   393
/**
williamr@2
   394
Mask to use to show attributes and reserved bits
williamr@2
   395
williamr@2
   396
@publishedAll
williamr@2
   397
*/
williamr@2
   398
#define KCDMaskShowAttrAndRes       0x000000ff
williamr@2
   399
williamr@2
   400
williamr@2
   401
/**
williamr@2
   402
Id for the Initial record in a record set
williamr@2
   403
williamr@2
   404
@publishedAll
williamr@2
   405
*/
williamr@2
   406
#define KCDInitialRecordId			0x00000100
williamr@2
   407
williamr@2
   408
williamr@2
   409
/**
williamr@2
   410
Id for the Initial table in the database
williamr@2
   411
williamr@2
   412
@publishedAll
williamr@2
   413
*/
williamr@2
   414
#define KCDInitialTableId			0x00800000
williamr@2
   415
williamr@2
   416
williamr@2
   417
/**
williamr@2
   418
Id for the Initial User defined table in the database
williamr@2
   419
clients have 64 table ids available to them
williamr@2
   420
williamr@2
   421
@publishedAll
williamr@2
   422
*/
williamr@2
   423
#define KCDInitialUDefRecordType   0x5F800000
williamr@2
   424
williamr@2
   425
williamr@2
   426
/**
williamr@2
   427
Id for the Last User defined table in the database.
williamr@2
   428
williamr@2
   429
@publishedAll
williamr@2
   430
*/
williamr@2
   431
#define KCDLastUDefRecordType      0x7F800000
williamr@2
   432
williamr@2
   433
williamr@2
   434
/**
williamr@2
   435
Id for the Initial column in a record set
williamr@2
   436
williamr@2
   437
@publishedAll
williamr@2
   438
*/
williamr@2
   439
#define KCDInitialColumnId			0x00010000
williamr@2
   440
williamr@2
   441
williamr@2
   442
/**
williamr@2
   443
T C 0   location for default field values
williamr@2
   444
williamr@2
   445
@publishedAll
williamr@2
   446
*/
williamr@2
   447
#define KCDDefaultRecord            0x00000000
williamr@2
   448
williamr@2
   449
williamr@2
   450
/**
williamr@2
   451
Combine with table id and Column id to give the location of column type info
williamr@2
   452
williamr@2
   453
@publishedAll
williamr@2
   454
*/
williamr@2
   455
#define KCDColumnTypeInfo           0x0000ff00
williamr@2
   456
williamr@2
   457
/**
williamr@2
   458
Combine with table id to give the location of table type info
williamr@2
   459
williamr@2
   460
@publishedPartner
williamr@2
   461
@released
williamr@2
   462
*/
williamr@2
   463
#define KCDTableTypeInfo            0x007fff00
williamr@2
   464
williamr@2
   465
/*
williamr@2
   466
Combine with table id to give location of record type info
williamr@2
   467
*/
williamr@2
   468
//#define KCDRecordTypeInfo			0x007f0000
williamr@2
   469
williamr@2
   470
williamr@2
   471
/**
williamr@2
   472
Use to request allocation of a new table id.
williamr@2
   473
Should only be called when creating a new user-defined table
williamr@2
   474
williamr@2
   475
@publishedPartner
williamr@2
   476
@released
williamr@2
   477
*/
williamr@2
   478
#define KCDNewTableRequest          0x007fff00
williamr@2
   479
williamr@2
   480
williamr@2
   481
/**
williamr@2
   482
Combine with table id to give request for a new column in a table.
williamr@2
   483
The table must already exist.  New columns should only normally be 
williamr@2
   484
requested when creating a new user-defined table
williamr@2
   485
williamr@2
   486
@publishedPartner
williamr@2
   487
@released
williamr@2
   488
*/
williamr@2
   489
#define KCDNewColumnRequest			0x0000ff01
williamr@2
   490
williamr@2
   491
williamr@2
   492
williamr@2
   493
/**
williamr@2
   494
Combine with table id to give request for a new record in a table.
williamr@2
   495
The table must already exist.
williamr@2
   496
williamr@2
   497
@publishedAll
williamr@2
   498
*/
williamr@2
   499
#define KCDNewRecordRequest			0x807f0001
williamr@2
   500
williamr@2
   501
williamr@2
   502
/**
williamr@2
   503
Combined with CMDBField, it finds the TableId given the table name
williamr@2
   504
williamr@2
   505
@publishedAll
williamr@2
   506
*/
williamr@2
   507
#define KCDMaskGenericTableName			KCDNewTableRequest
williamr@2
   508
williamr@2
   509
williamr@2
   510
williamr@2
   511
/**
williamr@2
   512
Maximum number of tables that can be created in one repository
williamr@2
   513
williamr@2
   514
@publishedAll
williamr@2
   515
*/
williamr@2
   516
#define KCDMaxTables                254
williamr@2
   517
williamr@2
   518
williamr@2
   519
/**
williamr@2
   520
Maximum number of User defined tables that can be created in one repository
williamr@2
   521
williamr@2
   522
@publishedAll
williamr@2
   523
*/
williamr@2
   524
#define KCDMaxUserDefTables         64
williamr@2
   525
williamr@2
   526
williamr@2
   527
/**
williamr@2
   528
Maximum number of columns that can be created in one table
williamr@2
   529
williamr@2
   530
@publishedAll
williamr@2
   531
*/
williamr@2
   532
#define KCDMaxColumns               126  
williamr@2
   533
williamr@2
   534
williamr@2
   535
/**
williamr@2
   536
Maximum number of records that can be stored in one table
williamr@2
   537
williamr@2
   538
@publishedAll
williamr@2
   539
*/
williamr@2
   540
#define KCDMaxRecords               254
williamr@2
   541
williamr@2
   542
williamr@2
   543
/**
williamr@2
   544
Maximum number of characters in a field name
williamr@2
   545
williamr@2
   546
@publishedAll
williamr@2
   547
*/
williamr@2
   548
#define KCDMaxFieldNameLength        64
williamr@2
   549
williamr@2
   550
williamr@2
   551
williamr@2
   552
/**
williamr@2
   553
Flag to indicate change in field
williamr@2
   554
Not for use in database.  Just with fields
williamr@2
   555
williamr@2
   556
@internalComponent
williamr@2
   557
*/
williamr@2
   558
#define KCDChangedFlag      0x00000001
williamr@2
   559
williamr@2
   560
/**
williamr@2
   561
@publishedPartner
williamr@2
   562
@released
williamr@2
   563
*/
williamr@2
   564
#define KCDMaxRecordId     0x0000ff00
williamr@2
   565
/**
williamr@2
   566
@publishedPartner
williamr@2
   567
@released
williamr@2
   568
*/
williamr@2
   569
#define KCDMaxColumnId     0x007f0000
williamr@2
   570
/**
williamr@2
   571
@publishedPartner
williamr@2
   572
@released
williamr@2
   573
*/
williamr@2
   574
#define KCDMaxTableId      0x7f800000
williamr@2
   575
williamr@2
   576
williamr@2
   577
williamr@2
   578
/*
williamr@2
   579
Mask to show only basic type info, 
williamr@2
   580
Masks out all info on links
williamr@2
   581
@internalComponent
williamr@2
   582
*/
williamr@2
   583
#define KCDShowBasicTypeInfo  0x000000ff
williamr@2
   584
/**
williamr@2
   585
Typedefs for convenience in meta data definitions
williamr@2
   586
@internalComponent
williamr@2
   587
*/
williamr@2
   588
using namespace Meta;
williamr@2
   589
williamr@2
   590
template <class TYPE> class TMDBVisitor;
williamr@2
   591
class TMDBRecordLinkVisitor;
williamr@2
   592
class TMDBRecordSetVisitor;
williamr@2
   593
class TMDBGenericRecordVisitor;
williamr@2
   594
class CMDBElement;
williamr@2
   595
williamr@2
   596
/*
williamr@2
   597
Visitors for field values
williamr@2
   598
*/
williamr@2
   599
williamr@2
   600
/**
williamr@2
   601
Typedefs for convenience in meta data definitions
williamr@2
   602
@internalComponent
williamr@2
   603
*/
williamr@2
   604
 typedef TMDBVisitor<TInt>                           TMDBNum;
williamr@2
   605
williamr@2
   606
/**
williamr@2
   607
Typedefs for convenience in meta data definitions
williamr@2
   608
@internalComponent
williamr@2
   609
*/	
williamr@2
   610
 typedef TMDBVisitor<TInt>                           TMDBBool;
williamr@2
   611
 
williamr@2
   612
/**
williamr@2
   613
Typedefs for convenience in meta data definitions
williamr@2
   614
@internalComponent
williamr@2
   615
*/	
williamr@2
   616
 typedef TMDBVisitor<TDesC>                          TMDBDes;	
williamr@2
   617
 
williamr@2
   618
/**
williamr@2
   619
Typedefs for convenience in meta data definitions
williamr@2
   620
@internalComponent
williamr@2
   621
*/
williamr@2
   622
 typedef TMDBVisitor<TDesC8>                         TMDBDes8;	
williamr@2
   623
williamr@2
   624
/*
williamr@2
   625
Visitors for containers
williamr@2
   626
*/
williamr@2
   627
williamr@2
   628
/**
williamr@2
   629
Typedefs for convenience in meta data definitions
williamr@2
   630
@internalComponent
williamr@2
   631
*/
williamr@2
   632
typedef TMDBRecordLinkVisitor						TMDBLink;	
williamr@2
   633
williamr@2
   634
/**
williamr@2
   635
Typedefs for convenience in meta data definitions
williamr@2
   636
@internalComponent
williamr@2
   637
*/		
williamr@2
   638
typedef TMDBRecordSetVisitor                        TMDBRecordSet;
williamr@2
   639
williamr@2
   640
/**
williamr@2
   641
Typedefs for convenience in meta data definitions
williamr@2
   642
@internalComponent
williamr@2
   643
*/		
williamr@2
   644
typedef TMDBGenericRecordVisitor                    TMDBGenRecord;		
williamr@2
   645
williamr@2
   646
/** UIDs for CommDB event notification */
williamr@2
   647
/**
williamr@2
   648
@publishedPartner
williamr@2
   649
@released
williamr@2
   650
*/
williamr@2
   651
const TUid KUidCommDbNotificationEvent = {0x1020762E};
williamr@2
   652
/**
williamr@2
   653
@publishedPartner
williamr@2
   654
@released
williamr@2
   655
*/
williamr@2
   656
const TUid KUidCommsDatStatusEvent = {KUidSystemCategoryValue};
williamr@2
   657
/**
williamr@2
   658
@publishedPartner
williamr@2
   659
@released
williamr@2
   660
*/
williamr@2
   661
const TInt KCommsDatStatusEventCommitSeq = 0x1020762F;
williamr@2
   662
williamr@2
   663
/**
williamr@2
   664
Metadatabase container type ids
williamr@2
   665
williamr@2
   666
@internalComponent
williamr@2
   667
*/
williamr@2
   668
#define KCDTIdMDBElement            123
williamr@2
   669
williamr@2
   670
/**
williamr@2
   671
Metadatabase container type ids
williamr@2
   672
williamr@2
   673
@internalComponent
williamr@2
   674
*/
williamr@2
   675
#define KCDTIdMDBNumFieldBase       223
williamr@2
   676
williamr@2
   677
/**
williamr@2
   678
Metadatabase container type ids
williamr@2
   679
williamr@2
   680
@internalComponent
williamr@2
   681
*/
williamr@2
   682
#define KCDTIdMDBTextFieldBase      224
williamr@2
   683
williamr@2
   684
/**
williamr@2
   685
Metadatabase container type ids
williamr@2
   686
williamr@2
   687
@internalComponent
williamr@2
   688
*/
williamr@2
   689
#define KCDTIdMDBBinFieldBase       225
williamr@2
   690
williamr@2
   691
/**
williamr@2
   692
Metadatabase container type ids
williamr@2
   693
williamr@2
   694
@internalComponent
williamr@2
   695
*/
williamr@2
   696
#define KCDTIdMDBRecordLinkBase     323
williamr@2
   697
williamr@2
   698
/**
williamr@2
   699
Metadatabase container type ids
williamr@2
   700
williamr@2
   701
@internalComponent
williamr@2
   702
*/
williamr@2
   703
#define KCDTIdMDBRecordSetBase      523
williamr@2
   704
williamr@2
   705
/**
williamr@2
   706
Metadatabase container type ids
williamr@2
   707
williamr@2
   708
@internalComponent
williamr@2
   709
*/
williamr@2
   710
#define KCDTIdMDBGenericRecord      585
williamr@2
   711
williamr@2
   712
williamr@2
   713
/**
williamr@2
   714
Macro for interaction with netmeta
williamr@2
   715
@publishedAll
williamr@2
   716
*/
williamr@2
   717
#define X_REGISTER_ATTRIBUTE( thisMetaClass, var, metaType ) \
williamr@2
   718
 { _FOFF( thisMetaClass, var ), Meta::metaType##VisitorFactoryL },
williamr@2
   719
williamr@2
   720
williamr@2
   721
#define EXP_DATA_VTABLE \
williamr@2
   722
 IMPORT_C virtual Meta::SVDataTableEntry const* GetVDataTable() const;	\
williamr@2
   723
 IMPORT_C virtual TUint8* GetAttribPtr(const TInt aOffset) const;	\
williamr@2
   724
 IMPORT_C static Meta::SVDataTableEntry const* GetVDataTableStatic(); \
williamr@2
   725
 static const Meta::SVDataTableEntry iVDataTable[];
williamr@2
   726
williamr@2
   727
williamr@2
   728
/**
williamr@2
   729
Macros used to implement virtual functions from MMetaData interface and construct the v data table
williamr@2
   730
@publishedAll
williamr@2
   731
*/
williamr@2
   732
#define EXP_START_ATTRIBUTE_TABLE( thisMetaClass, uid, typeId ) \
williamr@2
   733
 EXPORT_C Meta::SVDataTableEntry const* thisMetaClass::GetVDataTable() const { return &iVDataTable[0]; };	\
williamr@2
   734
 EXPORT_C TUint8* thisMetaClass::GetAttribPtr(const TInt aOffset) const { return (TUint8*)this + aOffset; };	\
williamr@2
   735
 EXPORT_C Meta::SVDataTableEntry const* thisMetaClass::GetVDataTableStatic() { return &iVDataTable[0]; }; \
williamr@2
   736
 const Meta::SVDataTableEntry thisMetaClass::iVDataTable[] = { \
williamr@2
   737
 { uid, reinterpret_cast<Meta::TMetaTypeNewL>(typeId) },
williamr@2
   738
williamr@2
   739
williamr@2
   740
#define END_ATTRIBUTE_TABLE_BASE_N( baseMetaClass, baseId, entry ) \
williamr@2
   741
 { (TInt)((TAny*)(baseMetaClass::GetVDataTableStatic() + entry)), NULL }};
williamr@2
   742
williamr@2
   743
williamr@2
   744
} //end namespace CommsDat
williamr@2
   745
#endif