Enumeration of various communication domains in the dedicated API of s60 Card Holders

Source: Internet
Author: User
Tags vcard

Sysbian sdkhas a document named using_symbian_contacts_model##. you can find the added data by using the above method. The following is a reference to the method described in the document: Thank you for your great help in a14776584.

Void insertcontactiteml ()
{
Cpbkcontactengine * Engine = cpbkcontactengine: newl ();
Cleanupstack: pushl (engine );
Cpbkcontactitem * Contact = engine-> createemptycontactl (); // create an empty Communication record
Cleanupstack: pushl (contact );
_ Partition (kfname, "King ");
_ Partition (klname, "chai ");
_ Partition (knumber, "13777777777 ");
// Modify the first name

Tpbkcontactitemfield * field = contact-> findfield (epbkfieldidfirstname );
Cpbkfieldinfo * fieldinfo;
Field-> textstorage ()-> settextl (kfname );
// Modify the last name
Field = contact-> findfield (epbkfieldidlastname );
Field-> textstorage ()-> settextl (klname );
// Modify the mobile phone number
Field = contact-> findfield (epbkfieldidphonenumbermobile); // mobile phone number
Field-> textstorage ()-> settextl (knumber );

Field = contact-> findfield (epbkfieldidphonenumbergeneral); // phone number
Field-> textstorage ()-> settextl (_ L ("000000 "));
 
Field = contact-> findfield (epbkfieldidphonenumberstandard); // phone number vCard: Tel; VOICE: 111111
Field-> textstorage ()-> settextl (_ L ("111111 "));

//

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidphonenumberhome); // phone number (home)
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidphonenumberhome );
Field-> textstorage ()-> settextl (_ L ("222222 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidphonenumberwork); // phone number (office)
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidphonenumberwork );
Field-> textstorage ()-> settextl (_ L ("333333 "));

Field = contact-> findfield (epbkfieldidfaxnumber); // Fax
Field-> textstorage ()-> settextl (_ L ("444444 "));

Field = contact-> findfield (epbkfieldidpagernumber); // Pager
Field-> textstorage ()-> settextl (_ L ("555555 "));

Field = contact-> findfield (epbkfieldidemailaddress); // email
Field-> textstorage ()-> settextl (_ L ("666666 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidpostaladdress); // address
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidpostaladdress );
Field-> textstorage ()-> settextl (_ L ("777777 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidurl); // URL
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidurl );
Field-> textstorage ()-> settextl (_ L ("888888 "));

Field = contact-> findfield (epbkfieldidjobtitle); // position
Field-> textstorage ()-> settextl (_ L ("999999 "));

Field = contact-> findfield (epbkfieldidcompanyname); // Company
Field-> textstorage ()-> settextl (_ L ("123456 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidcompanyaddress); // address
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidcompanyaddress );
Field-> textstorage ()-> settextl (_ L ("789012 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldiddtmfstring );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldiddtmfstring); // dual-Tone Multi-frequency
Field-> textstorage ()-> settextl (_ L ("909090 "));

Tdatetime datetime;
Tint year = 1996, month = 12, Day = 31;
Datetime. Set (year, tmonth (month-1), day-1, 0, 0, 0 );
Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldiddate );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldiddate); // birthday
Field-> datetimestorage ()-> settime (datetime );

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidnote );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidnote); // remarks
Field-> textstorage ()-> settextl (_ L ("12121212 "));

// Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidvoicetagindication );
// Contact-> addfieldl (* fieldinfo );
// Field = contact-> findfield (epbkfieldidvoicetagindication );//
// Field-> textstorage ()-> settextl (_ L ("333333 "));

// Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidspeeddialindication );
// Contact-> addfieldl (* fieldinfo );
// Field = contact-> findfield (epbkfieldidspeeddialindication );//
// Field-> textstorage ()-> settextl (_ L ("444444 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidpersonalringingtoneindication );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidpersonalringingtoneindication); // ringtone
Field-> textstorage ()-> settextl (_ L ("098765 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidpobox );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidpobox); // mail box
Field-> textstorage ()-> settextl (_ L ("999888 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidextendedaddress );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidextendedaddress); // address details
Field-> textstorage ()-> settextl (_ L ("999777 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidstreetaddress );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidstreetaddress); // Sub-District
Field-> textstorage ()-> settextl (_ L ("999666 "));

// Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidwvid );
// Contact-> addfieldl (* fieldinfo );
// Field = contact-> findfield (epbkfieldidwvid );//
// Field-> textstorage ()-> settextl (_ L ("999555 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidsecondname );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidsecondname); // nickname
Field-> textstorage ()-> settextl (_ L ("999444 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidphonenumbervideo );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidphonenumbervideo); // Videophone
Field-> textstorage ()-> settextl (_ L ("999000 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidpostalcode );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidpostalcode); // zip code
Field-> textstorage ()-> settextl (_ L ("111333 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidcity );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidcity); // City
Field-> textstorage ()-> settextl (_ L ("222333 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidstate );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidstate); // province/District/County
Field-> textstorage ()-> settextl (_ L ("444333 "));

Fieldinfo = engine-> fieldsinfo (). Find (epbkfieldidcountry );
Contact-> addfieldl (* fieldinfo );
Field = contact-> findfield (epbkfieldidcountry); // country or region
Field-> textstorage ()-> settextl (_ L ("333555 "));

Tcontactitemid id = engine-> addnewcontactl (* contact); // Add the modified result to the database and return the ID of the contact list item. You can use it later

Cleanupstack: popanddestroy (contact );
Cleanupstack: popanddestroy (engine );
}

// Exported vCard Information
// Begin: vCard
// Version 2.1
// Rev: 20090721t054256z
// End: vCard
// Begin: vCard
// Version 2.1
// Rev: 20090721t060823z
// N: Chai; King ;;;
// ADR: 999888; 999777; 999666; 222333; 444333; 111333; 333555
// Org: 123456;
// Title: 999999
// Tel; cell: 13777777777
// Tel; VOICE: 111111
// Tel; video: 999000
// Tel; Fax: 444444
// Tel; Pager: 555555
// Email; Internet: 666666
// Tel; voice; Home: 222222
// Tel; voice; Work: 333333
// Label: 789012
// URL: 888888
// Bday: 19961231
// Note: 12121212
// X-EPOCSECONDNAME: 999444
// End: vCard

Epbkfieldidvoicetagindication, epbkfieldidspeeddialindication, epbkfieldidwvid, engine-> fieldsinfo (). find () returns a null pointer, and some of the enumerated values listed above are duplicate items in the s60 card folder, and the display will overwrite each other, such as epbkfieldidpostaladdress and epbkfieldidcompanyaddress, however, the vCard information indicates that the actual data is not overwritten.

Some enumeration values in pbkfields. HRH have not been studied yet. paste them here. I hope you can tell me one or two of them:

# Define epbkfieldidlastnamereading 0x21
# Define epbkfieldidfirstnamereading 0x22
# Define epbkfieldidlocationidindication 0x23
# Define epbkfieldidvoip 0x24
# Define epbkfieldidpushtotalk 0x25
# Define epbkfieldid1_view 0x26
# Define epbkfieldidsipid 0x27
# Define epbkfieldidcodtextid 0x28
# Define epbkfieldidcodimageid 0x29
# Define epbkfieldidprefix 0x30
# Define epbkfieldidsuffix 0x31
# Define kpbkfieldidmask 0xff
# Define epbkfieldgroupidnone 0x00
# Define epbkfieldgroupidpostaladdress 0x01
# Define epbkfieldgroupidhomeaddress 0x02
# Define epbkfieldgroupidcompanyaddress 0x03
# Define epbkfieldgroupidfirstname 0x04
# Define epbkfieldgroupidlastname 0x05

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/a14776584/archive/2009/07/21/4366744.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.