1.1 --- a/epoc32/include/metadatabase.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/metadatabase.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 2004-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 @@ -15,15 +15,12 @@
1.16 //
1.17 //
1.18
1.19 -
1.20 -
1.21 /**
1.22 @file
1.23 - @publishedPartner
1.24 + @publishedAll
1.25 @released
1.26 */
1.27
1.28 -
1.29 #if (!defined METADATABASE_H)
1.30 #define METADATABASE_H
1.31
1.32 @@ -33,6 +30,10 @@
1.33 #include <comms-infras/metadata.h>
1.34 #include <comms-infras/metatype.h>
1.35
1.36 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.37 +#include <metadatabase_partner.h>
1.38 +#endif
1.39 +
1.40 // CommsDat headers
1.41 #include <commsdat.h>
1.42
1.43 @@ -157,8 +158,7 @@
1.44 @publishedAll
1.45 @released
1.46 */
1.47 -typedef TUint32 TMDBAttributeFlags;
1.48 -
1.49 +typedef TUint32 TMDBAttributeFlags;
1.50
1.51 /**
1.52 The identifier for any entry in the MetaDatabase.
1.53 @@ -174,8 +174,46 @@
1.54 */
1.55 typedef TUint32 TMDBElementId;
1.56
1.57 +
1.58 +//
1.59 +// COMMSDAT RECORD BASE CLASS
1.60 +// Contains fields common to all records
1.61 +//
1.62 +
1.63 + // Element Type Ids
1.64 +
1.65 + /**
1.66 + Field will contain a user-defined numeric tag for a record.
1.67 + Useful for user searches and cheaper to search on a numeric tag than a string name.
1.68 + Can be null.
1.69 + This tag is not automatically connected with the record id itself,
1.70 + which is contained within the ElementId for the record and not in any field.
1.71 +
1.72 + @publishedAll
1.73 + @released
1.74 + */
1.75 + const TMDBElementId KCDTIdRecordTag = 0x00010000;
1.76 +
1.77 + /**
1.78 + Field will contain a user-defined string tag for a record.
1.79 + This is used to uniquely identify business level information within a record.
1.80 +
1.81 + This field is useful for user searches, however it should be noted that it would be more efficient to use the KCDTIdRecordTag field instead
1.82 + as it is quicker and cheaper to search for a number than for a string.
1.83 +
1.84 + @publishedAll
1.85 + @released
1.86 + */
1.87 + const TMDBElementId KCDTIdRecordName = 0x00020000;
1.88 +
1.89 +
1.90 + // Element Type Names
1.91 + #define KCDTypeNameRecordTag _S("Id")
1.92 + #define KCDTypeNameRecordName _S("Name")
1.93 +
1.94 +
1.95 class CMDBSession : public CBase
1.96 -/*
1.97 +/**
1.98 A session with the underlying storage server
1.99 @publishedAll
1.100 @released
1.101 @@ -202,28 +240,24 @@
1.102 @pre None
1.103 @post on success a session has been created and initialised
1.104
1.105 - @publishedAll
1.106 */
1.107 IMPORT_C static CMDBSession* NewL(TVersion aRequiredVersion);
1.108
1.109 /**
1.110 As NewL and adds Session to the CleanupStack
1.111
1.112 - @publishedAll
1.113 */
1.114 IMPORT_C static CMDBSession* NewLC(TVersion aRequiredVersion);
1.115
1.116 /**
1.117 Virtual Destructor
1.118
1.119 - @publishedAll
1.120 */
1.121 IMPORT_C ~CMDBSession();
1.122
1.123
1.124 /**
1.125 Close session with storage server.
1.126 -
1.127 @publishedAll
1.128 @deprecated v9.1 Destructor is all that is required
1.129 */
1.130 @@ -231,11 +265,17 @@
1.131
1.132
1.133 /**
1.134 - Lookup latest data format version
1.135 -
1.136 + Returns the KCDCurrentVersion constant which maps to the KCDVersion1_1
1.137 + constant for backward compatibility reason. Please avoid using this method
1.138 + when creating a CommsDat session object and use explicit schema version
1.139 + instead.
1.140 +
1.141 @pre None
1.142 @post None
1.143 +
1.144 @publishedAll
1.145 + @deprecated
1.146 +
1.147 */
1.148 IMPORT_C static TVersion LatestVersion();
1.149
1.150 @@ -243,7 +283,7 @@
1.151 /**
1.152 Lookup data format version currently in use by client
1.153
1.154 - @publishedAll
1.155 +
1.156 */
1.157 IMPORT_C TVersion VersionInUse();
1.158
1.159 @@ -260,7 +300,7 @@
1.160 @pre None
1.161 @post on success the session has exclusive write access to the database
1.162
1.163 - @publishedAll
1.164 +
1.165 */
1.166 IMPORT_C void OpenTransactionL();
1.167
1.168 @@ -275,20 +315,17 @@
1.169
1.170 @post On success the database is updated with data added, modified or deleted during the transaction
1.171 @post On failure, any open data containers may not be in sync with the database and should be discarded or reloaded
1.172 - @publishedAll
1.173 */
1.174 IMPORT_C void CommitTransactionL();
1.175
1.176
1.177 /**
1.178 Cancel Transaction with database and rollback all associated changes
1.179 - Will not make any changes to the client's containers
1.180
1.181 @leave Will fail with KErrNotFound if not in transaction
1.182
1.183 @pre None - though for correct usage, ensure a transaction is already open
1.184 @post Any open data containers may not be in sync with the database and should be discarded or reloaded
1.185 - @publishedAll
1.186 */
1.187 IMPORT_C void RollbackTransactionL();
1.188
1.189 @@ -298,9 +335,7 @@
1.190 Not in transaction,
1.191 Already in transaction for this session,
1.192 Write-lock not available. Another session has it.
1.193 -
1.194 @pre None
1.195 - @publishedAll
1.196 */
1.197 IMPORT_C TInt IsInTransaction();
1.198
1.199 @@ -313,7 +348,6 @@
1.200 providing the client has enough platform security capabilities to back up the request
1.201
1.202 @pre None
1.203 - @publishedAll
1.204 */
1.205 IMPORT_C void SetAttributeMask(TMDBAttributeFlags aAttributeFlags);
1.206
1.207 @@ -331,7 +365,7 @@
1.208 This means that the attribute is obeyed in all database interactions for this session
1.209
1.210 @pre None
1.211 - @publishedAll
1.212 +
1.213 */
1.214 IMPORT_C TBool IsSetAttributeMask(TMDBAttributeFlags aAttributeFlags);
1.215
1.216 @@ -348,7 +382,7 @@
1.217
1.218 @pre None
1.219
1.220 - @publishedAll
1.221 +
1.222 */
1.223 IMPORT_C void ClearAttributeMask(TMDBAttributeFlags aAttributeFlags);
1.224
1.225 @@ -363,7 +397,6 @@
1.226
1.227 @pre None
1.228
1.229 - @publishedAll
1.230 */
1.231 IMPORT_C TInt CancelAllNotifications();
1.232
1.233 @@ -379,7 +412,6 @@
1.234
1.235 @pre None
1.236
1.237 - @internalComponent
1.238 */
1.239 IMPORT_C TInt PublishProperties();
1.240
1.241 @@ -394,6 +426,7 @@
1.242 CMDBSessionImpl* iMDBSessionImpl;
1.243
1.244 friend class MMetaDatabase;
1.245 + friend class CommsDatSchema;
1.246 };
1.247
1.248
1.249 @@ -401,10 +434,11 @@
1.250
1.251
1.252 class MMetaDatabase : public Meta::MMetaData
1.253 -/*
1.254 +/**
1.255 Interface for interaction with a database server
1.256 Inherited by each data set type that can be stored
1.257 @publishedAll
1.258 +@released
1.259 */
1.260 {
1.261 public:
1.262 @@ -440,7 +474,6 @@
1.263 Ensure that the session object has been initialised with the correct dataset version
1.264 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.265
1.266 - @publishedAll
1.267 */
1.268 IMPORT_C void LoadL(CMDBSession& aSession);
1.269
1.270 @@ -461,7 +494,9 @@
1.271 May also leave with KErrGeneral or other general error codes.
1.272
1.273 On failure, the container should be discarded or repopulated before it is used again
1.274 -
1.275 +
1.276 + Please note - a case insensitive search is done in the case of text based fields
1.277 +
1.278 @pre
1.279
1.280 Populate this container where necessary with valid data to match during the find operation
1.281 @@ -469,7 +504,6 @@
1.282 <Table><Column>
1.283 Ensure that the session object has been initialised with the correct dataset version
1.284 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.285 - @publishedAll
1.286 */
1.287 IMPORT_C TBool FindL(CMDBSession& aSession);
1.288
1.289 @@ -499,7 +533,6 @@
1.290 <Table><Column><Record>
1.291 Ensure that the session object has been initialised with the correct dataset version
1.292 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.293 - @publishedAll
1.294 */
1.295 IMPORT_C void RefreshL(CMDBSession& aSession);
1.296
1.297 @@ -528,7 +561,8 @@
1.298 May also leave with other general error codes if there are unexpected
1.299 problems (e.g. KErrNoMemory when out of memory)
1.300
1.301 -
1.302 + Store will be atomic - all fields stored after success. No fields stored if the function leaves
1.303 +
1.304 If StoreL fails or the later commit is not successful, The data in the container will not
1.305 match the data in the database.
1.306
1.307 @@ -542,15 +576,12 @@
1.308 Ensure that the session object has been initialised with the correct dataset version
1.309 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.310
1.311 - @publishedAll
1.312 */
1.313 IMPORT_C void StoreL(CMDBSession& aSession);
1.314
1.315
1.316 /**
1.317 Modify all fields in the database that have been changed in this container by the caller
1.318 -
1.319 - Only modifies existing data in the database, won't create new fields VCT - is this true?? don't think so
1.320
1.321 Modification is atomic for this container. It uses an internal transaction even if
1.322 no overall transaction set by client.
1.323 @@ -562,9 +593,7 @@
1.324 However, only fields that the client has capabilities to alter will be modified.in the database
1.325 A request to modify data in an unauthorised area will cause the function to leave.with
1.326 KErrPermissionDenied
1.327 -
1.328 - If field does not exist, the function will leave with
1.329 - KErrNotFound [VCT - surely not]
1.330 +
1.331
1.332 May also leave with other general error codes if there are unexpected
1.333 problems (e.g. KErrNoMemory when out of memory)
1.334 @@ -578,7 +607,6 @@
1.335 <Table><Column><Record>
1.336 Ensure that the session object has been initialised with the correct dataset version
1.337 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.338 - @publishedAll
1.339 */
1.340 IMPORT_C void ModifyL(CMDBSession& aSession);
1.341
1.342 @@ -601,7 +629,6 @@
1.343 Ensure that the session object has appropriate access control attributes to manage the target data in the database
1.344 Ensure the ElementId for this container correcty identifies the target data in the database
1.345
1.346 - @publishedAll
1.347 */
1.348 IMPORT_C void DeleteL(CMDBSession& aSession);
1.349
1.350 @@ -631,8 +658,6 @@
1.351
1.352 @pre None
1.353 @post A notification request will be outstanding
1.354 -
1.355 - @publishedAll
1.356 */
1.357 IMPORT_C TInt RequestNotification(CMDBSession& aSession,
1.358 TRequestStatus& aRequestStatus);
1.359 @@ -648,7 +673,6 @@
1.360
1.361 There is an outstanding notification request
1.362
1.363 - @publishedAll
1.364 */
1.365 IMPORT_C TInt CancelNotification(CMDBSession& aSession,
1.366 TRequestStatus& aRequestStatus);
1.367 @@ -657,19 +681,19 @@
1.368 protected:
1.369
1.370
1.371 - explicit MMetaDatabase();
1.372 + IMPORT_C explicit MMetaDatabase();
1.373
1.374 private:
1.375
1.376 /*
1.377 @internalComponent
1.378 */
1.379 - void DoLoadL(CMDBSessionImpl* aSession, CMDBElement* aElement, CMDBElement* aMapper, TInt& aErr, TMDBElementId aRecordId, TMDBElementId aAttributes);
1.380 + void DoLoadL(CMDBSessionImpl* aSession, CMDBElement* aElement, CMDBElement* aMapper, TInt& aErr, TMDBElementId aRecordId, TMDBElementId aAttributes, TBool isTheLoadForMapper = EFalse);
1.381
1.382 /*
1.383 @internalComponent
1.384 */
1.385 - void DoLoadL(CMDBSessionImpl* aSession, CMDBElement* aElement, CMDBElement* aMapper, TInt& aErr, TMDBElementId aRecordId, TMDBElementId aAttributes, RArray<TUint32>& aMatches);
1.386 + void DoLoadL(CMDBSessionImpl* aSession, CMDBElement* aElement, CMDBElement* aMapper, TInt& aErr, TMDBElementId aRecordId, TMDBElementId aAttributes, RArray<TUint32>& aMatches, TBool isTheLoadForMapper = EFalse);
1.387
1.388 /*
1.389 @internalComponent
1.390 @@ -698,7 +722,7 @@
1.391
1.392
1.393 class CMDBElement : public CBase, public MMetaDatabase
1.394 -/*
1.395 +/**
1.396 Every item stored in the database is represented as a CMDBElement
1.397 This class contains the id and attributes of every item in the database
1.398 and for individual fields it also contains the value.
1.399 @@ -712,24 +736,18 @@
1.400
1.401 /**
1.402 Default Constructor
1.403 -
1.404 - @publishedAll
1.405 */
1.406 IMPORT_C CMDBElement();
1.407
1.408
1.409 /**
1.410 Constructor
1.411 -
1.412 - @publishedAll
1.413 */
1.414 IMPORT_C CMDBElement(TMDBElementId aElementId);
1.415
1.416
1.417 /**
1.418 Destructor
1.419 -
1.420 - @publishedAll
1.421 */
1.422 IMPORT_C ~CMDBElement();
1.423
1.424 @@ -747,7 +765,6 @@
1.425 It also identifies the type of the data stored in this element
1.426 and the instance of the type
1.427
1.428 - @publishedAll
1.429 */
1.430 IMPORT_C TMDBElementId ElementId() const;
1.431
1.432 @@ -765,7 +782,6 @@
1.433 For an element that is a Table or a Record, the ColumnId field will be set to
1.434
1.435 KCDMaxColumnId
1.436 - @publishedAll
1.437 */
1.438 IMPORT_C TMDBElementId TypeId() const;
1.439
1.440 @@ -779,7 +795,6 @@
1.441
1.442 It identifies the table in the database that holds the data contained in this element
1.443
1.444 - @publishedAll
1.445 */
1.446 IMPORT_C TMDBElementId TableId() const;
1.447
1.448 @@ -791,7 +806,6 @@
1.449
1.450 It identifies a particular instance of this type of Element in the database
1.451
1.452 - @publishedAll
1.453 */
1.454 IMPORT_C TInt RecordId() const;
1.455
1.456 @@ -801,7 +815,6 @@
1.457
1.458 Attributes express database access rights for the data of this element
1.459
1.460 - @publishedAll
1.461 */
1.462 IMPORT_C TMDBAttributeFlags Attributes() const;
1.463
1.464 @@ -810,7 +823,6 @@
1.465 /**
1.466 Sets the ElementId
1.467
1.468 - @publishedAll
1.469 */
1.470 IMPORT_C void SetElementId(TMDBElementId aElementId);
1.471
1.472 @@ -818,7 +830,6 @@
1.473 /**
1.474 Sets the TypeId
1.475
1.476 - @publishedAll
1.477 */
1.478 IMPORT_C void SetTypeId(TMDBElementId aElementId);
1.479
1.480 @@ -826,7 +837,6 @@
1.481 /**
1.482 Sets the RecordId
1.483
1.484 - @publishedAll
1.485 */
1.486 IMPORT_C void SetRecordId(TInt aRecordId);
1.487
1.488 @@ -834,7 +844,6 @@
1.489 /**
1.490 Sets one or more attributes
1.491
1.492 - @publishedAll
1.493 */
1.494 IMPORT_C void SetAttributes(TMDBAttributeFlags aAttributes);
1.495
1.496 @@ -842,7 +851,6 @@
1.497 /**
1.498 Clears one or more attributes
1.499
1.500 - @publishedAll
1.501 */
1.502 IMPORT_C void ClearAttributes(TMDBAttributeFlags aAttributes);
1.503
1.504 @@ -852,8 +860,6 @@
1.505
1.506 Returns ETrue if all queried attributes are set
1.507 Returns EFalse if any queried attribute is not set.
1.508 -
1.509 - @publishedAll
1.510 */
1.511 IMPORT_C TBool IsSetAttribute(TMDBAttributeFlags aAttributes) const;
1.512
1.513 @@ -864,7 +870,6 @@
1.514 Returns ETrue if the value of the element is not set
1.515 Returns EFalse if the element contains a value
1.516
1.517 - @publishedAll
1.518 */
1.519 IMPORT_C TBool IsNull() const;
1.520
1.521 @@ -877,7 +882,6 @@
1.522
1.523 Returns the enumeration TCDFieldValueTypes that represents the value that can be stored in this element
1.524
1.525 - @publishedAll
1.526 */
1.527
1.528 virtual TCDFieldValueTypes Type()=0;
1.529 @@ -886,13 +890,6 @@
1.530 @internalComponent
1.531 */
1.532 TMDBElementId* Data(){return &iElementId;}
1.533 -
1.534 - /**
1.535 - @internalComponent
1.536 - */
1.537 - const TMDBElementId* CData(){return &iElementId;}
1.538 -
1.539 -
1.540
1.541 protected:
1.542
1.543 @@ -905,13 +902,13 @@
1.544
1.545
1.546
1.547 -///////////////////////////////////////////////////////////////////////////////////////
1.548 +//
1.549 // COMMSDAT CONTAINERS
1.550 //
1.551
1.552 /**
1.553 Commsdat Container classes qualifying numeric values
1.554 -@internalComponent
1.555 +@publishedAll
1.556 */
1.557 class CMDBNumFieldBase : public CMDBElement
1.558 {
1.559 @@ -926,7 +923,7 @@
1.560 Constructor setting Field's ElementId
1.561 */
1.562 IMPORT_C CMDBNumFieldBase(TMDBElementId aFieldId);
1.563 -
1.564 +
1.565
1.566 /**
1.567 Assignment operator for field value
1.568 @@ -937,7 +934,9 @@
1.569 TMDBElementId GetL();
1.570
1.571 EXP_DATA_VTABLE
1.572 +
1.573
1.574 +private:
1.575 virtual TCDFieldValueTypes Type()
1.576 {
1.577 return EInt;
1.578 @@ -952,14 +951,13 @@
1.579 This class describes a single numeric field in the database
1.580
1.581 @publishedAll
1.582 +@released
1.583 */
1.584 {
1.585 public:
1.586
1.587 /**
1.588 Default Constructor
1.589 -
1.590 - @publishedAll
1.591 */
1.592 inline CMDBField()
1.593 {
1.594 @@ -967,8 +965,6 @@
1.595
1.596 /**
1.597 Constructor setting Field's ElementId
1.598 -
1.599 - @publishedAll
1.600 */
1.601 inline CMDBField(TMDBElementId aFieldId)
1.602 : CMDBNumFieldBase(aFieldId)
1.603 @@ -978,8 +974,6 @@
1.604
1.605 /**
1.606 Assignment operator for field value
1.607 -
1.608 - @publishedAll
1.609 */
1.610 inline CMDBField<TYPE>& operator=(const TYPE& aValue)
1.611 {
1.612 @@ -994,8 +988,6 @@
1.613
1.614 /**
1.615 Conversion operator for field value
1.616 -
1.617 - @publishedAll
1.618 */
1.619 inline operator TYPE&()
1.620 {
1.621 @@ -1004,8 +996,6 @@
1.622
1.623 /**
1.624 Conversion operator for field value
1.625 -
1.626 - @publishedAll
1.627 */
1.628 inline CMDBField<TYPE>& GetL()
1.629 {
1.630 @@ -1019,8 +1009,6 @@
1.631
1.632 /**
1.633 Function for setting a value
1.634 -
1.635 - @publishedAll
1.636 */
1.637 inline void SetL(const TYPE& aValue)
1.638 {
1.639 @@ -1031,10 +1019,10 @@
1.640
1.641
1.642
1.643 -//////////////////
1.644 +//
1.645 /**
1.646 Base Container class qualifying a text field
1.647 -@internalComponent
1.648 +@publishedAll
1.649 */
1.650 class CMDBTextFieldBase : public CMDBElement
1.651 {
1.652 @@ -1065,7 +1053,8 @@
1.653 IMPORT_C void SetMaxLengthL(TInt aLength);
1.654
1.655 EXP_DATA_VTABLE
1.656 -
1.657 +
1.658 +private:
1.659 virtual TCDFieldValueTypes Type()
1.660 {
1.661 return EText;
1.662 @@ -1086,14 +1075,13 @@
1.663 This class describes a single field in the database
1.664
1.665 @publishedAll
1.666 +@released
1.667 */
1.668 {
1.669 public:
1.670
1.671 /**
1.672 Default Constructor
1.673 -
1.674 - @publishedAll
1.675 */
1.676 inline CMDBField()
1.677 {
1.678 @@ -1101,8 +1089,6 @@
1.679
1.680 /**
1.681 Constructor setting Field's ElementId
1.682 -
1.683 - @publishedAll
1.684 */
1.685 inline CMDBField(TMDBElementId aFieldId)
1.686 : CMDBTextFieldBase(aFieldId)
1.687 @@ -1130,8 +1116,6 @@
1.688
1.689 /**
1.690 Conversion operator for field value
1.691 -
1.692 - @publishedAll
1.693 */
1.694 inline operator const TDesC&()
1.695 {
1.696 @@ -1143,8 +1127,6 @@
1.697
1.698 /**
1.699 Conversion operator for field value
1.700 -
1.701 - @publishedAll
1.702 */
1.703 inline TDesC& GetL()
1.704 {
1.705 @@ -1158,8 +1140,6 @@
1.706
1.707 /**
1.708 Function for setting a value
1.709 -
1.710 - @publishedAll
1.711 */
1.712 inline void SetL(const TDesC& aValue)
1.713 {
1.714 @@ -1171,10 +1151,10 @@
1.715 };
1.716
1.717
1.718 -//////////////////
1.719 +//
1.720 /**
1.721 Container class for qualifying binary values
1.722 -@internalComponent
1.723 +@publishedAll
1.724 */
1.725 class CMDBBinFieldBase : public CMDBElement
1.726 {
1.727 @@ -1208,7 +1188,8 @@
1.728 IMPORT_C void SetMaxLengthL(TInt aLength);
1.729
1.730 EXP_DATA_VTABLE
1.731 -
1.732 +
1.733 +private:
1.734 virtual TCDFieldValueTypes Type()
1.735 {
1.736 return EDesC8;
1.737 @@ -1223,14 +1204,13 @@
1.738 This class describes a single field in the database
1.739
1.740 @publishedAll
1.741 +@released
1.742 */
1.743 {
1.744 public:
1.745
1.746 /**
1.747 Default Constructor
1.748 -
1.749 - @publishedAll
1.750 */
1.751 inline CMDBField()
1.752 {
1.753 @@ -1238,8 +1218,6 @@
1.754
1.755 /**
1.756 Constructor setting Field's ElementId
1.757 -
1.758 - @publishedAll
1.759 */
1.760 inline CMDBField(TMDBElementId aFieldId)
1.761 : CMDBBinFieldBase(aFieldId)
1.762 @@ -1268,8 +1246,6 @@
1.763
1.764 /**
1.765 Conversion operator for field value
1.766 -
1.767 - @publishedAll
1.768 */
1.769 inline operator const TDesC8&()
1.770 {
1.771 @@ -1281,8 +1257,6 @@
1.772
1.773 /**
1.774 Conversion operator for field value
1.775 -
1.776 - @publishedAll
1.777 */
1.778 inline TDesC8& GetL()
1.779 {
1.780 @@ -1296,8 +1270,6 @@
1.781
1.782 /**
1.783 Function for setting a value
1.784 -
1.785 - @publishedAll
1.786 */
1.787 inline void SetL(const TDesC8& aValue)
1.788 {
1.789 @@ -1309,11 +1281,11 @@
1.790
1.791
1.792
1.793 -///////////////////////////////////////////////////////////////////////////////////////////////
1.794 +//
1.795
1.796 /**
1.797 Base class for CMDBRecordLink
1.798 -@internalComponent
1.799 +@publishedAll
1.800 */
1.801 class CMDBRecordLinkBase : public CMDBNumFieldBase
1.802 {
1.803 @@ -1341,15 +1313,16 @@
1.804 */
1.805 IMPORT_C operator TMDBElementId();
1.806
1.807 - TCDFieldValueTypes Type()
1.808 - {
1.809 - return ELink;
1.810 - }
1.811
1.812 protected:
1.813
1.814 EXP_DATA_VTABLE
1.815
1.816 +private:
1.817 + TCDFieldValueTypes Type()
1.818 + {
1.819 + return ELink;
1.820 + }
1.821 public:
1.822
1.823 // the record referenced by the link id stored in the value of this field.
1.824 @@ -1368,9 +1341,13 @@
1.825
1.826 The linked record itself can be viewed via the iLinkedRecord member and its accessors
1.827
1.828 - iLinkedRecord must be created explicitly by the client - either on construction,
1.829 - or by use of the CreateLinkL or SetLinkL functions. Often the linked record is not
1.830 - required by a caller. So creating it automatically would just waste memory
1.831 + If a record is loaded then the iLinkedRecord must be created explicitly
1.832 + by the client - either on construction, or by use of the CreateLinkL or
1.833 + SetLinkL functions. Often the linked record is not required by a caller.
1.834 + So creating it automatically would just waste memory
1.835 +
1.836 + However in the case of an explicit load of a LinkedRecord field the ILinkedRecord
1.837 + is created.
1.838
1.839 When instantiating iLinkedRecord directly take care to match the object's type to the Type
1.840 ID that will be found at the linking element. It is better to use the CreateLinkL or
1.841 @@ -1385,8 +1362,6 @@
1.842 public :
1.843 /**
1.844 Constructor/Destructor
1.845 -
1.846 - @publishedAll
1.847 */
1.848
1.849 inline CMDBRecordLink()
1.850 @@ -1394,23 +1369,16 @@
1.851
1.852 /**
1.853 Constructor
1.854 -
1.855 - @publishedAll
1.856 */
1.857 inline CMDBRecordLink(TMDBElementId aLinkingFieldId)
1.858 : CMDBRecordLinkBase(aLinkingFieldId) {}
1.859
1.860 /**
1.861 Constructor
1.862 -
1.863 - @publishedAll
1.864 */
1.865 inline CMDBRecordLink(TMDBElementId aLinkingFieldId, RECORD_TYPE* aLinkedRecord)
1.866 : CMDBRecordLinkBase(aLinkingFieldId, (CMDBElement*)aLinkedRecord) {}
1.867
1.868 - /**
1.869 - @publishedAll
1.870 - */
1.871 inline CMDBRecordLink& operator=(const TMDBElementId aValue)
1.872 {
1.873 return (CMDBRecordLink&)CMDBRecordLinkBase::operator=(aValue);
1.874 @@ -1421,8 +1389,6 @@
1.875
1.876 /**
1.877 Set the field value (this will be validated on StoreL)
1.878 -
1.879 - @publishedAll
1.880 */
1.881 inline void SetL(const TMDBElementId aValue)
1.882 {
1.883 @@ -1434,8 +1400,6 @@
1.884
1.885 /**
1.886 conversion operator for linked record of this type
1.887 -
1.888 - @publishedAll
1.889 */
1.890 inline operator RECORD_TYPE*()
1.891 {
1.892 @@ -1447,25 +1411,21 @@
1.893 enum TFieldTypeAttributes
1.894 /**
1.895 To express type information for all MetaDatabase fields
1.896 -@publishedAll
1.897 -@released
1.898 */
1.899 {
1.900 - ENoAttrs, ///< No attributes associated with this field.
1.901 - ENotNull, ///< Ensures the field contains a value and must not be null.
1.902 + ENoAttrs, //< No attributes associated with this field.
1.903 + ENotNull, //< Ensures the field contains a value and must not be null.
1.904 };
1.905
1.906 typedef struct
1.907 /**
1.908 To express type information for all MetaDatabase fields
1.909 -@publishedAll
1.910 -@released
1.911 */
1.912 {
1.913 - const TMDBElementId iTypeId; ///< Identifier for the field.
1.914 - const TInt iValType; ///< The field type value e.g.EText, EMedText.
1.915 - const TFieldTypeAttributes iTypeAttr; ///< The field attribute, either ENoAttrs or ENotNull.
1.916 - const TText * const iTypeName; ///< Name of the field type.
1.917 + const TMDBElementId iTypeId; //< Identifier for the field.
1.918 + const TInt iValType; //< The field type value e.g.EText, EMedText.
1.919 + const TFieldTypeAttributes iTypeAttr; //< The field attribute, either ENoAttrs or ENotNull.
1.920 + const TText * const iTypeName; //< Name of the field type.
1.921
1.922 } SRecordTypeInfo;
1.923
1.924 @@ -1477,8 +1437,6 @@
1.925 typedef struct SGenericRecordTypeInfoTag
1.926 /**
1.927 To express type information for all MetaDatabase fields
1.928 -@publishedAll
1.929 -@released
1.930 */
1.931 {
1.932 SGenericRecordTypeInfoTag()
1.933 @@ -1508,10 +1466,10 @@
1.934 : iTypeId(aId), iValType(aVal), iTypeAttr(aAttrType), iTypeName(aTypeName) {}
1.935
1.936
1.937 - TMDBElementId iTypeId; ///< Identifier for the field type.
1.938 - TInt iValType; ///< The field type value e.g.EText, EMedText.
1.939 - TFieldTypeAttributes iTypeAttr; ///< The type's attribute, either ENoAttrs or ENotNull
1.940 - TGenericTypeName iTypeName; ///< Name of the field type.
1.941 + TMDBElementId iTypeId; //< Identifier for the field type.
1.942 + TInt iValType; //< The field type value e.g.EText, EMedText.
1.943 + TFieldTypeAttributes iTypeAttr; //< The type's attribute, either ENoAttrs or ENotNull
1.944 + TGenericTypeName iTypeName; //< Name of the field type.
1.945 } SGenericRecordTypeInfo;
1.946
1.947
1.948 @@ -1600,19 +1558,10 @@
1.949 */
1.950 {
1.951 public:
1.952 - /**
1.953 - @internalComponent
1.954 - */
1.955 IMPORT_C CMDBRecordSetBase();
1.956
1.957 - /**
1.958 - @internalComponent
1.959 - */
1.960 IMPORT_C CMDBRecordSetBase(TMDBElementId aElementId);
1.961
1.962 - /**
1.963 - @internalComponent
1.964 - */
1.965 IMPORT_C ~CMDBRecordSetBase();
1.966
1.967 inline CMDBRecordSetBase& operator=(const TPtrC& aValue)
1.968 @@ -1639,6 +1588,7 @@
1.969 Records can be ordered using the standard RPointerArray functions
1.970
1.971 @publishedAll
1.972 +@released
1.973 */
1.974 {
1.975 public:
1.976 @@ -1662,9 +1612,6 @@
1.977
1.978 };
1.979
1.980 -
1.981 -
1.982 -
1.983 } //end namespace CommsDat
1.984
1.985 #endif // METADATABASE_H