Contacts Model API in .NET framework

Encoder Code-39 in .NET framework Contacts Model API
11.6 Contacts Model API
ANSI/AIM Code 39 Recognizer In Visual Studio .NET
Using Barcode Control SDK for .NET framework Control to generate, create, read, scan barcode image in Visual Studio .NET applications.
As with other APIs covered in this book, we will not cover all aspects of the Contact Model. It is fully documented in Symbian OS SDKs, but the sheer volume of information can make it more dif cult to get started than you might expect. In particular, this chapter will not cover classes and methods concerned with specialized database manipulation (such as rollbacks and recovery), synchronization, eld views and specialized phone number handling.
Code 39 Drawer In VS .NET
Using Barcode creator for VS .NET Control to generate, create Code 39 image in Visual Studio .NET applications.
11.6.1 Contact Database
Recognize Code 3/9 In VS .NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
Class CContactDatabase De ned in cntdb.h CContactDatabase provides access to a Contact Database and its members. It is the starting point for access to the Contact Model. Creation Methods static CContactDatabase* OpenL(TThreadAccess aAccess =ESingleThread) static CContactDatabase* OpenL(const TDesC& aFileName, TThreadAccess aAccess =ESingleThread)
Bar Code Creator In .NET Framework
Using Barcode printer for .NET Control to generate, create barcode image in .NET applications.
USING THE CONTACTS MODEL
Scanning Bar Code In VS .NET
Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in VS .NET applications.
These methods open access to an existing Contact Database. A new database can be created using the CreateL() methods. The method that does not specify a le name opens the default Contact Database. aFileName the name of the database to be opened if the default database is not wanted. aAccess determines whether the database should be opened for single or multi-thread access. The default ESingleThread setting is probably correct unless the database is to be used by a multi-threaded application. returns a pointer to a CContactDatabase object. Sorting and Searching Methods CContactIdArray* FindLC(const TDesC& aText, const CContactItemFieldDef *aFieldDef) This method searches for a text string in a de ned set of elds in all contacts in the database. aText the text to search for. aFieldDef the set of elds to search. returns array of contact identi ers for contact items that contain the search string. The caller takes ownership of the array. void SortL(CArrayFix<TSortPref>* aSortOrder) This method sorts the database. After the method returns, the contact item identi ers can be accessed using the SortedItemsL() method. Usually, it will be better to use a view rather than sort the whole database. aSortOrder array of sort preferences. The database is sorted by the rst sort preference. Any identical matches are then sorted by the next sort preference and so on. If the array is of zero length then the database is not sorted. const CContactIdArray* SortedItemsL() This method returns an array of contact items sorted by SortL(). The caller does not take ownership of the array. The array remains valid only until the database is changed or until the database s Active Object runs. If the caller wants the array after this then they need to take a copy of the array. void SetDbViewContactType(const TUid aUid) This method sets the type of contact items to be included in sorted views of the database. This value is initialized to KUidContactItem when the database is opened. This means that all CContactItem -derived types (cards, nonsystem templates, groups, own cards) are included in database views. aUid speci es a contact type which should be one of the following: KUidContactCard (contact cards), KUidContactGroup (contact item groups), KUidContactOwnCard (own cards), KUidContactCardTemplate (templates which are not system templates, i.e. which have been added to the database), or KUidContactItem (all of the above). Contact Item Methods CContactItem* ReadMinimalContactL(TContactItemId aContactId) CContactItem* ReadMinimalContactLC(TContactItemId aContactId)
Creating Code 39 In Visual C#
Using Barcode maker for .NET framework Control to generate, create Code 39 Extended image in .NET applications.
CONTACTS MODEL API
Encode USS Code 39 In .NET
Using Barcode drawer for ASP.NET Control to generate, create ANSI/AIM Code 39 image in ASP.NET applications.
These methods provide read-only access to a contact item accessed by contact item identi er. They are faster than the ReadContactL() methods because they do not read template and group information. aContactId the contact item identi er. returns a CContactItem. the caller takes ownership of the item. CContactItem* ReadContactL(TContactItemId aContactId) CContactItem* ReadContactLC(TContactItemId aContactId) These methods provide read-only access to a contact item accessed by contact item identi er. aContactId the contact item identi er. returns a CContactItem. The caller takes ownership of the item. CContactItem* ReadContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef) CContactItem* ReadContactLC(TContactItemId aContactId,const CContactItemViewDef& aViewDef) These methods provide read-only access to selected elds of a contact item accessed by contact item identi er. aContactId the contact item identi er. aViewDef the contact item elds to be included in the item. returns a CContactItem. The caller takes ownership of the item. CContactItem* OpenContactL(TContactItemId aContactId) CContactItem* OpenContactLX(TContactItemId aContactId) These methods open a contact for editing. The item remains open until CommitContactL() or CloseContactL() is called. The LX version of the method leaves the lock record on the cleanup stack. aContactId the contact item identi er. returns a CContactItem. The caller takes ownership of the item. CContactItem* OpenContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef) CContactItem* OpenContactLX(TContactItemId aContactId,const CContactItemViewDef& aViewDef) These methods open a contact for editing while accessing only selected elds. Care is necessary because when the contact is committed any elds not loaded by the eld view will be deleted from the item. The item remains open until CommitContactL() or CloseContactL() is called. The LX version of the method leaves the lock record on the cleanup stack. aContactId the contact item identi er. returns a CContactItem. The caller takes ownership of the item. void CloseContactL(TContactItemId aContactId) This method closes a contact item without committing any changes. Closing a contact that is not open or does not exist does not cause an error. aContactId the item identi er of the contact to be closed.
USS Code 39 Creation In Visual Basic .NET
Using Barcode encoder for VS .NET Control to generate, create Code 39 Full ASCII image in Visual Studio .NET applications.
Generate Data Matrix ECC200 In Visual Studio .NET
Using Barcode drawer for .NET framework Control to generate, create Data Matrix ECC200 image in VS .NET applications.
EAN128 Creator In VS .NET
Using Barcode drawer for VS .NET Control to generate, create GTIN - 128 image in .NET applications.
Paint Bar Code In Java
Using Barcode printer for Java Control to generate, create bar code image in Java applications.
UPC - 13 Creator In .NET Framework
Using Barcode generator for ASP.NET Control to generate, create EAN-13 Supplement 5 image in ASP.NET applications.
ECC200 Scanner In Visual Studio .NET
Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
Make GTIN - 12 In C#.NET
Using Barcode creation for .NET Control to generate, create UPC Symbol image in VS .NET applications.