RCntModel Class Reference
class RCntModel : public RSessionBase |
Client-side Contacts Model session handle.
Public Member Functions |
---|
| RCntModel() |
void | AddObserverL(MContactDbObserver &) |
TInt
| BeginDbTransaction() |
void | BeginIterateL(TInt) |
void | CancelAsyncOpen() |
void | ChangeSortOrderL(TInt, const CContactTextDef &) |
void | Close() |
TBool
| CloseContact(TContactItemId) |
TInt
| CloseCrud() |
void | CloseDatabase() |
TInt
| CloseIterator() |
TInt
| CloseProperties() |
void | CloseTablesL() |
void | CloseView(TInt) |
CContactIdArray * | CollectionL(TInt, TTime, const TDesC &) |
void | CommitContactL(const CContactItem &, TBool) |
TInt
| CommitDbTransaction() |
void | ConnectL() |
TInt
| ConnectionId() |
TInt
| ContactCountL() |
TBool
| ContactMatchesHintFieldL(TInt, TContactItemId) |
TContactItemId
| CreateContactL(CContactItem &) |
TInt
| CreateDatabase(const TDesC &) |
void | CrudAsyncOp(TInt, TRequestStatus &) |
TInt
| CrudSyncOp(TInt) |
TContactItemId
| CurrentItem() |
TInt
| DatabaseDrive(TDriveUnit &) |
TBool
| DatabaseExistsL(const TDesC &) |
TBool
| DatabaseReadyL() |
TInt
| DefaultDatabase(TDes &) |
void | DeleteContactL(const TContactItemId, TCntSendEventAction, TBool) |
TInt
| DeleteDatabase(const TDesC &) |
void | EndIterateL(TInt) |
void | EndNotificationTransfer() |
CContactIdArray * | FetchGroupListIdsL() |
CContactIdArray * | FetchTemplateListIdsL() |
TInt
| FileSize() |
TPtrC
| FileUidL() |
void | FilterDatabaseL(CCntFilter &) |
void | FindAsyncInitL(const TDesC &, CContactItemFieldDef *) |
TBool
| FindAsyncL(CContactIdArray *&) |
void | FindAsyncTextDefInitL(const CDesCArray &, CContactTextDef *) |
CContactIdArray * | FindL(const TDesC &, const CContactItemFieldDef *) |
TInt
| GetCurrentDatabase(TDes &) |
TUid
| GetDbViewContactType() |
void | GetDefinitionsOfExistingViewsL(const TDesC &, RPointerArray< CContactDefaultViewDefinition > &) |
CArrayFix< CContactDatabase::TSortPref > * | GetSortPreferenceL() |
TContactItemId
| GetSpeedDialFieldL(TInt, TDes &) |
void | HandlePrematureServerTerminationL() |
TContactItemId
| ICCTemplateIdL(TUid) |
CViewContact * | ItemAtL(TContactItemId, TInt) |
void | IteratorAsyncOp(TInt, TRequestStatus &) |
TInt
| IteratorSyncOp(TInt) |
CDesCArray * | ListDatabasesL(TDriveUnit *) |
TInt64
| MachineId() |
CContactIdArray * | MatchPhoneNumberL(const TDesC &, const TInt) |
CViewContact * | NextItemL(TInt, const TInt) |
CContactItem * | OpenContactLX(const CContactItemViewDef *, TContactItemId) |
TInt
| OpenCrud() |
TInt
| OpenDatabase(const TDesC &) |
void | OpenDatabaseAsyncL(TRequestStatus &, const TDesC &) |
TInt
| OpenIterator() |
TInt
| OpenProperties() |
void | OpenTablesL() |
TInt
| OpenViewL(const CContactTextDef &, const TInt) |
void | OverrideMachineUniqueId(TInt64) |
TContactItemId
| OwnCard() |
TContactItemId
| PhonebookGroupIdL() |
TContactItemId
| PrefTemplateId() |
void | PropertiesAsyncOp(TInt, TRequestStatus &) |
TInt
| PropertiesSyncOp(TInt) |
TInt
| ReCreateTemplate() |
CContactItem * | ReadContactL(const CContactItemViewDef *, TContactItemId) |
void | ReadContactTextDefL(TContactItemId, TDes &, const CContactTextDef &) |
TInt
| RemoveCurrentItem() |
void | RemoveObserver(const MContactDbObserver &) |
void | RemoveSpeedDialFieldL(TContactItemId, TInt) |
TInt
| ReplaceDatabase(const TDesC &) |
void | ResetServerSpeedDialsL() |
TInt
| ResourceCount() |
TInt
| RollbackDbTransaction() |
TBool
| SeekContactL(TContactItemId, TContactItemId &, TUid &, TBool &) |
void | SetAsyncActivityL(TBool) |
TInt
| SetCurrentDatabase(const TDesC &) |
void | SetCurrentItem(TContactItemId) |
void | SetDatabaseDriveL(TDriveUnit, TBool) |
void | SetDbViewContactType(const TUid) |
void | SetFieldAsSpeedDialL(TContactItemId, TInt, TInt) |
void | SetHeapFailure(RHeap::TAllocFail, TInt) |
void | SetOperationTimeOutL(const TInt) |
void | SetOwnCardL(const CContactItem &) |
void | SetPrefTemplateL(const TContactItemId) |
void | SetSortPreferenceL(const CArrayFix< CContactDatabase::TSortPref > &) |
void | SetViewDefinitionL(const CContactViewDef &) |
void | StartNotificationTransfer(TRequestStatus &, TDes8 &) |
void | TextFieldL(TInt, TFieldType, TDes &) |
void | UnlockLastLockedContact() |
Inherited Functions |
---|
| RHandleBase::Attributes()const |
| RHandleBase::BTraceId()const |
| RHandleBase::DoExtendedClose() |
| RHandleBase::Duplicate(const RThread &,TOwnerType) |
| RHandleBase::FullName()const |
| RHandleBase::FullName(TDes &)const |
| RHandleBase::Handle()const |
| RHandleBase::HandleInfo(THandleInfo *) |
| RHandleBase::Name()const |
| RHandleBase::NotifyDestruction(TRequestStatus &) |
| RHandleBase::Open(const TFindHandleBase &,TOwnerType) |
| RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt) |
| RHandleBase::RHandleBase() |
| RHandleBase::RHandleBase(TInt) |
| RHandleBase::SetHandle(TInt) |
| RHandleBase::SetHandleNC(TInt) |
| RSessionBase::CreateSession(RServer2,const TVersion &) |
| RSessionBase::CreateSession(RServer2,const TVersion &,TInt) |
| RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *) |
| RSessionBase::Open(RMessagePtr2,TInt,TOwnerType) |
| RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType) |
| RSessionBase::Open(TInt,TOwnerType) |
| RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType) |
| RSessionBase::Send(TInt)const |
| RSessionBase::Send(TInt,const TIpcArgs &)const |
| RSessionBase::SendReceive(TInt)const |
| RSessionBase::SendReceive(TInt,TRequestStatus &)const |
| RSessionBase::SendReceive(TInt,const TIpcArgs &)const |
| RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const |
| RSessionBase::SetReturnedHandle(TInt) |
| RSessionBase::SetReturnedHandle(TInt,RHandleBase &) |
| RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &) |
| RSessionBase::ShareAuto() |
| RSessionBase::ShareProtected() |
Constructor & Destructor Documentation
RCntModel()
RCntModel constructor.
Member variables must be initialised (zero'd) in the constructor since RCntModel does not derive from CBase.
Member Functions Documentation
AddObserverL(MContactDbObserver &)
Add a database event observer.
BeginDbTransaction()
TInt
| BeginDbTransaction | ( | ) | const |
Start a database transaction.
BeginIterateL(TInt)
void | BeginIterateL | ( | TInt | aViewId | ) | |
CancelAsyncOpen()
Cancel last asynchronous database open request.
ChangeSortOrderL(TInt, const CContactTextDef &)
CloseContact(TContactItemId)
Close/unLock an existing contact in the database.
CloseDatabase()
Close currently open database.
CloseIterator()
TInt
| CloseIterator | ( | ) | const |
CloseProperties()
TInt
| CloseProperties | ( | ) | const |
CloseTablesL()
Close the database tables.
CloseView(TInt)
void | CloseView | ( | TInt | aViewId | ) | |
CollectionL(TInt, TTime, const TDesC &)
Get a collection of contact IDs using the specified collection parameters.
Parameters
TInt aCollectionType | Type of collection. |
TTime aTime = 0 | Used if collection type is "changed since". |
const TDesC & aGuid =
KNullDesC
| Used if collection type is "find GUID". |
CommitContactL(const CContactItem &, TBool)
void | CommitContactL | ( | const CContactItem & | aContact, |
| TBool | aSendChangedEvent = ETrue |
| ) | const |
Update and unlock an existing contact in the database.
Parameters
const CContactItem & aContact | The contact to be updated and unlocked |
TBool aSendChangedEvent = ETrue | If ETrue the changed event should be sent after the update/unlock. |
CommitDbTransaction()
TInt
| CommitDbTransaction | ( | ) | const |
Commit a database transaction.
ConnectL()
Open a Contacts server session.
ConnectionId()
Returns the connection ID of the current client session.
ContactCountL()
TInt
| ContactCountL | ( | ) | const |
Get the number of contacts in the database.
ContactMatchesHintFieldL(TInt, TContactItemId)
Tests whether a contact item's hint bit field matches a filter.
Parameters
TInt aBitWiseFilter | The filter to compare the item against. This is a combination of TContactViewFilter values. |
TContactItemId aContactId | The ID of the item in the database. |
CreateContactL(CContactItem &)
Add a new contact to the database.
Parameters
CContactItem & aContact | The contact to be added to the database. |
CreateDatabase(const TDesC &)
Create an empty named contact database.
Creates the default contacts database if the default argument is used. The given descriptor must not contain more than KCntMaxFilePath characters.
Parameters
const TDesC & aCntFile =
KNullDesC
| Contacts database filename (in the form drive:database). Defaults to KCntDefaultDrive. |
CrudAsyncOp(TInt, TRequestStatus &)
CurrentItem()
Gets the ID of the current item, as set by SetCurrentItem(). The current item ID is initialised to KNullContactId when the database is opened.
DatabaseDrive(TDriveUnit &)
Retrieve the current contact database drive.
Parameters
TDriveUnit & aDriveUnit | Contains the current contact database drive unit on return. |
DatabaseExistsL(const TDesC &)
Determine if the named contact database file exists.
If the aCntFile argument is the default, determines if default contact database file exists.
-
leave
- KErrArgument if the given descriptor contains more than the maximum length of 190 characters, otherwise one of the System error codes.
-
capability
- None
Parameters
const TDesC & aCntFile =
KNullDesC
| Contacts database filename (in the form drive:database). |
DatabaseReadyL()
TBool
| DatabaseReadyL | ( | ) | const |
Determine if the database is ready. Ready in this context means that the database is open and readable/writable (i.e. the state machine is in CStateWritable).
DefaultDatabase(TDes &)
TInt
| DefaultDatabase | ( | TDes & | aCntFile | ) | const |
Get the name of the default contact database file.
The given descriptor must have room for minimum of KCntMaxFilePath characters.
Parameters
TDes & aCntFile | Contains the default contact database name on return. |
DeleteContactL(const TContactItemId, TCntSendEventAction, TBool)
Delete a contact from the database.
Parameters
const TContactItemId aCntId | |
TCntSendEventAction aCntEventType | The event type to pass on to the observers. |
TBool aDecAccessCount = EFalse | If ETrue access count should be decremented prior to the deletion. |
DeleteDatabase(const TDesC &)
Delete a named contact database.
Deletes the default contacts database if the default argument is used. The given descriptor must not contain more than KCntMaxFilePath characters.
Parameters
const TDesC & aCntFile =
KNullDesC
| Contacts database filename (in the form drive:database). Defaults to KCntDefaultDrive. |
DoGetCollectionChangedSinceL(TTime)
Get a collection of contact IDs which have changed since the given time.
Parameters
TTime aTime | Changed since time. |
DoGetCollectionGuidL(const TDesC &)
Get a collection of contact IDs which have the given GUID. Since GUIDs are unique (i.e. no two contacts can have the same GUID) there will only ever be one contact ID in this collection.
Parameters
const TDesC & aGuid | Contact GUID. |
DoGetCollectionL(TInt)
Get a collection of contact IDs for the given collection type.
Parameters
TInt aCollectionType | Collection type. |
EndIterateL(TInt)
void | EndIterateL | ( | TInt | aViewId | ) | |
EndNotificationTransfer()
void | EndNotificationTransfer | ( | ) | |
End (cancel) request for database event from server.
FetchGroupListIdsL()
Get a list of group IDs from the server.
FetchTemplateListIdsL()
Get a list of template IDs from the server.
FileSize()
Gets the size of the database file in bytes.
FileUidL()
Get the database file UID.
FilterDatabaseL(CCntFilter &)
Filter the database using the given filter.
Parameters
CCntFilter & aFilter | Filter to use. On return the contact IDs in this filter will be augmented with those contact IDs which match the given filter. |
FindAsyncInitL(const TDesC &, CContactItemFieldDef *)
Initialise the Persistence Layer collection class ready for iterative calls to the FindAsyncL() method. This form of initialisation is for an asynchronous find which uses text and a field definition.
FindAsyncL(CContactIdArray *&)
Parameters
CContactIdArray *& aIdArray | Set of contacts IDs from previous calls to FindAsyncL(). Will be NULL if this is the first iteration. |
FindAsyncTextDefInitL(const CDesCArray &, CContactTextDef *)
Initialise the Persistence Layer collection class ready for iterative calls to the FindAsyncL() method. This form of initialisation is for an asynchronous find which uses a text definition and an array of "find words".
FindL(const TDesC &, const CContactItemFieldDef *)
GetCurrentDatabase(TDes &)
TInt
| GetCurrentDatabase | ( | TDes & | aDatabase | ) | const |
When there are multiple contact databases on a device this method can be used to enquire which database is the current one.
The current database functions are provided as part of current item functionality. In order to pass a current item from one contacts model client to another, the receiving client needs to be using the same database.
The current database is a path and filename, set using SetCurrentDatabase(), which is persisted by the contacts server.
Parameters
TDes & aDatabase | The path and filename of the current database. KNullDesC if no current database has been set. |
GetDbViewContactType()
TUid
| GetDbViewContactType | ( | ) | const |
GetDefinitionsOfExistingViewsL(const TDesC &, RPointerArray< CContactDefaultViewDefinition > &)
void | GetDefinitionsOfExistingViewsL | ( | const TDesC & | aDbName, |
| RPointerArray< CContactDefaultViewDefinition > & | aViewDefs |
| ) | |
GetSortPreferenceL()
Get the sort preferences from the server.
GetSpeedDialFieldL(TInt, TDes &)
Returns the ID of the contact item whose telephone number field is mapped to the speed dial position specified.
This function is provided so that information may be displayed about a contact item whose telephone number is being dialled using speed dialling.
The function also retrieves the telephone number stored in the field.
Parameters
TInt aSpeedDialPosition | The speed dial position. This is an integer in the range 1 to 9 inclusive. If outside this range, the function leaves with KErrArgument. |
TDes & aPhoneNumber | On return contains the telephone number which is mapped to the speed dial position specified. Returns KNullDesC if the speed dial position requested has not been set. |
HandlePrematureServerTerminationL()
void | HandlePrematureServerTerminationL | ( | ) | |
Handle a premature termination of the contact server process by re-connecting the session and re-opening the database.
ICCTemplateIdL(TUid)
Returns the ID of the template that should be used with CContactICCEntry items. If aPhonebookUid is set, the ID of the template belonging to the phonebook with TUid aPhonebookUid is returned.
Parameters
TUid aPhonebookUid = KNullUid | The phonebook ID with default KNullUid. |
ItemAtL(TContactItemId, TInt)
IteratorAsyncOp(TInt, TRequestStatus &)
ListDatabasesL(TDriveUnit *)
List the contact database files for any given drive unit. Lists all databases on all drives if aDriveUnit is set to NULL.
-
leave
- KErrNoMemory if not enough free memory, KErrNotReady if drive does not, otherwise one of the System error codes.
-
capability
- ReadUserData
Parameters
TDriveUnit * aDriveUnit = NULL | The drive unit to search. Searches all drives if default argument is used. |
MachineId()
Get the machine ID.
Note: This function can leave.
-
leave
- KErrNone The send operation is successful
-
leave
- KErrServerTerminated The server no longer present
-
leave
- KErrServerBusy There are no message slots available
-
leave
- KErrNoMemory There is insufficient memory available
-
capability
- None
MatchPhoneNumberL(const TDesC &, const TInt)
Returns an array of contact item IDs for all the contact items which may contain the specified telephone number in a telephone, fax or SMS type field.
Parameters
const TDesC & aNumber | Phone number string |
const TInt aMatchLengthFromRight | Number of digits from the right of the phone number to use. Up to 15 digits can be specified and it is recommended that at least 7 match digits are specified. |
NextItemL(TInt, const TInt)
OpenContactLX(const CContactItemViewDef *, TContactItemId)
Open and lock an existing contact in the database. The contact item lock is pushed onto the cleanup stack.
OpenDatabase(const TDesC &)
Open a named contact database.
Opens the default contacts database if the default argument is used. The given descriptor must not contain more than KCntMaxFilePath characters.
Parameters
const TDesC & aCntFile =
KNullDesC
| Filename (in the form drive:database). Defaults to KCntDefaultDrive. |
OpenDatabaseAsyncL(TRequestStatus &, const TDesC &)
Open a named contact database asynchronously.
Opens the default contacts database if the default argument is used. The given descriptor must not contain more than KCntMaxFilePath characters.
Parameters
TRequestStatus & aStatus | Asynchronous request object. Request is completed when database has been opened. |
const TDesC & aCntFile =
KNullDesC
| Contacts database filename (in the form drive:database). Defaults to KCntDefaultDrive. |
OpenProperties()
TInt
| OpenProperties | ( | ) | const |
OpenTablesL()
Open the database tables.
OpenViewL(const CContactTextDef &, const TInt)
OverrideMachineUniqueId(TInt64)
void | OverrideMachineUniqueId | ( | TInt64 | aMachineUniqueId | ) | |
Set the machine ID (debug only).
Parameters
TInt64 aMachineUniqueId | New machine ID. |
OwnCard()
Returns the ID of the database's current own card.
Having obtained this ID, the client may then open the own card in the same way as an ordinary contact card (using ReadContactL() or OpenContactL()).
PhonebookGroupIdL()
Returns the ID of the contacts model group which represents the ADN phonebook.
PrefTemplateId()
Returns the ID of the database's preferred template, as set by the method SetPrefTemplateL(). The preferred template is for clients who may have multiple templates but want to identify one as preferred.
PropertiesAsyncOp(TInt, TRequestStatus &)
PushUnlockL()
void | PushUnlockL | ( | ) | const [private] |
Push a Contact item unlock cleanup item on the cleanup stack.
ReCreateTemplate()
TInt
| ReCreateTemplate | ( | ) | const |
Create the system template.
ReadContactL(const CContactItemViewDef *, TContactItemId)
Read an existing contact in the database.
ReadContactTextDefL(TContactItemId, TDes &, const CContactTextDef &)
RemoveObserver(const MContactDbObserver &)
Remove a database event observer.
RemoveSpeedDialFieldL(TContactItemId, TInt)
Removes the mapping between a contact item field and a speed dial position.
Removes the KUidSpeedDialXxx UID from the field's content type, removes the field's speed dial attribute and commits the changes to the item.
-
leave
- KErrDiskFull The disk does not have enough free space to perform the operation.
-
capability
- ReadUserData
-
capability
- WriteUserData
Parameters
TContactItemId aContactId | The ID of the contact item containing the speed dial field. |
TInt aSpeedDialPosition | The speed dial position. This is an integer in the range 1 to 9 inclusive. If outside this range, the function leaves with KErrArgument. |
ReplaceDatabase(const TDesC &)
Replace a named contact database with an empty one, replacing any database with the same name. Replaces the default contacts database if the default argument is used. The given descriptor must not contain more than KCntMaxFilePath characters.
Parameters
const TDesC & aCntFile =
KNullDesC
| Contacts database filename (in the form drive:database). Defaults to KCntDefaultDrive. |
ResetServerSpeedDialsL()
void | ResetServerSpeedDialsL | ( | ) | |
RollbackDbTransaction()
TInt
| RollbackDbTransaction | ( | ) | const |
Rollback a database transaction.
SeekContactL(TContactItemId, TContactItemId &, TUid &, TBool &)
Seek to the given contact ID.
Parameters
TContactItemId aContactId | Contact ID to seek to. |
TContactItemId & aId | On return the contact ID that the seek found. This will be the nearest contact ID if the given aContactID cannot be found. |
TUid & aContactType | On return the contact type of the contact that the seek found. |
TBool & aDeleted | On return ETrue if the contact that the seek found is marked as deleted, EFalse otherwise. |
SetAsyncActivityL(TBool)
void | SetAsyncActivityL | ( | TBool | aAsyncActivity | ) | |
Set the asynchronous activity flag in the server. Any asynchronous activity such as asynchronous find or asynchronous sort prevent the database from being closed and should set this flag. When all asynchronous activites are finished this flag should be cleared.
Parameters
TBool aAsyncActivity | ETrue if at least one asynchronous activity, EFalse if no asynchronous activities. |
SetCurrentDatabase(const TDesC &)
TInt
| SetCurrentDatabase | ( | const TDesC & | aDatabase | ) | const |
When there are multiple contact databases on a device this method can be used to set a database as the current one.
Note: this function simply updates a file name which is stored by the Contacts server and its use is optional. It is provided as part of current item functionality.
In order to pass a current item from one contacts model client to another, the receiving client needs to be using the same database.
Parameters
const TDesC & aDatabase | The path and filename of the current database. |
SetCurrentItem(TContactItemId)
Sets the ID of the current item and persists it in the database. The current item is provided for use by clients who want to identify one contact item in the database as the currently selected item.
SetDatabaseDriveL(TDriveUnit, TBool)
Sets the contact database drive and optionally moves the default contact database from its current location to the new drive. This function guarantees an all or nothing operation. If the database is not successfully moved, the drive setting is not updated to reflect the change.
Parameters
TDriveUnit aDriveUnit | The drive to which to move the contact database. |
TBool aCopy = ETrue | ETrue moves the existing file to the specified drive. Deletion of the source file will fail if it is in use. EFalse does not move the file. The default argument value is ETrue. |
SetDbViewContactType(const TUid)
void | SetDbViewContactType | ( | const TUid | aUid | ) | |
SetFieldAsSpeedDialL(TContactItemId, TInt, TInt)
Sets a field containing a telephone number as a speed dial field. The field is identified by aFieldIndex within the contact item aItem. It is assigned a speed dial position between 1 and 9 inclusive.
The field's speed dial and user added attributes are set and the appropriate UID (KUidSpeedDialXxx) is added to the field's content type. The changes are committed to the database.
Notes:
-
If an item's telephone number field has already been assigned to position aSpeedDialPosition, that item is updated so that the speed dial attribute is removed from its field and the speed dial field type UID is removed from the field's content type, before the new speed dial field is set.
-
leave
- KErrDiskFull The disk does not have enough free space to perform the operation.
-
capability
- ReadUserData
-
capability
- WriteUserData
Parameters
TContactItemId aContactId | |
TInt aFieldIndex | Index of a field in aItem's field set to set as a speed dial field. |
TInt aSpeedDialPosition | The speed dial position. This is an integer in the range 1 to 9 inclusive. If outside this range, the function leaves with KErrArgument. |
SetFileName(const TDesC &)
TInt
| SetFileName | ( | const TDesC & | aCntFile | ) | const [private] |
Set the database filename. Used to re-open the database if the server is terminated prematurely.
Parameters
const TDesC & aCntFile | Contacts database filename (in the form drive:database). |
SetHeapFailure(RHeap::TAllocFail, TInt)
SetOperationTimeOutL(const TInt)
void | SetOperationTimeOutL | ( | const TInt | aMicroSeconds | ) | const |
Set the operation timeout value. This value is the length of time that a deferred request will remain in the request queue in the State Machine before being completed with an error code.
Parameters
const TInt aMicroSeconds | The operation timeout in microseconds. This timeout will only be applied to requests sent by clients of this database after this point in time. |
SetOwnCardL(const CContactItem &)
Sets an existing contact item to be the database's current own card.
-
leave
- KErrNotFound aContact does not exist in the database.
-
leave
- KErrDiskFull The disk does not have enough free space to perform the operation.
-
capability
- None
Parameters
const CContactItem & aContact | The contact item to set as the database's current own card. It must already exist in the database. It cannot be a group or a template. |
SetPrefTemplateL(const TContactItemId)
Sets the database's preferred template.
The preferred template's ID persists when the database is opened and closed. If the preferred template is subsequently deleted, the preferred template ID is set to KNullContactId.
-
leave
- KErrNotSupported The item is not a template (i.e. is not of type KUidContactCardTemplate).
-
leave
- KErrDiskFull The disk does not have enough free space to perform the operation.
-
capability
- WriteUserData
SetSortPreferenceL(const CArrayFix< CContactDatabase::TSortPref > &)
Set the sort preferences in the server.
SetViewDefinitionL(const CContactViewDef &)
Change the existing contact view definition on the server.
StartNotificationTransfer(TRequestStatus &, TDes8 &)
Request a database event from the server.
Parameters
TRequestStatus & aStatus | Completed when database event is available. |
TDes8 & aEvent | When aStatus is completed contains the database event. |
TextFieldL(TInt, TFieldType, TDes &)
UnPackContactLC(TInt, TIpcArgs &)
Unpacks a contact item contained within the Packager's internal buffer and creates a contact item object. Within the server, the contact item has been written to the Packager's internal buffer by the RMessage2.
If the buffer size was returned then the buffer was not large enough to hold a serialised contact item. The buffer must be expanded to the size returned by the server (ie aBufferSize) and the read operation performed again.
CCntPackager::SetBufferFromMessageL()
- capability
- ReadUserData
Parameters
TInt aBufferSize | The new buffer size. |
TIpcArgs & aArgs | The argument buffer where the serialised contact item is written by the server. |
UnlockLastLockedContact()
void | UnlockLastLockedContact | ( | ) | |
Unlock the last locked contact item on the server. Used by OpenLX().
Version()
Get the Contacts server version number.
Member Data Documentation
TInt
iConnectionId
TInt
| iConnectionId | [private] |
CCntDbNotifyMonitor * iDbNotifyMonitor
CCntDbNotifyMonitor * | iDbNotifyMonitor | [private] |
TBuf< KCntMaxFilePath > iFileName
TBuf< KUidBufferSize > iFileUid
TInt
iNoOfSvrStartAttempts
TInt
| iNoOfSvrStartAttempts | [private] |
CCntPackager * iPackager
CCntPackager * | iPackager | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.