diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +
Description:
+The Import
method imports a contact to a contacts
+database. The information must be imported from a vCard file.
This method can be called both synchronously and asynchronously.
+Syntax:
+For synchronous calls:
+result = so.IDataSource.Import(criteria);+ +
For asynchronous calls:
+result = so.IDataSource.Import(criteria, callback);+ +
Arguments:
+criteria
:
This is an object that specifies the contact to import and optionally +the target database. For more information about the object properties and +how to define them, see section Criteria for importing a contact.
+ +callback
:
The callback
argument is the name of the method
+that is executed when an asynchronous Import
call has
+results or status information to return. You must define this method separately.
+Follow the instructions in section Defining the callback handler for an asynchronous method to
+define the callback
method.
This argument is used only with an asynchronous Import
call.
Return value:
+If synchronous, the Import
method returns an object
+that contains an error code and an error message.
If asynchronous, the method returns an object that contains a transaction
+ID for the callback
instance,
+an error code, and an error message. When the asynchronous call has completed, callback
returns
+an object that contains an error code and an error message (see Table: Callback return value).
+ Property + |
+ Description + |
+ Value + |
---|---|---|
+
|
+
+ This is a number used as an identification to match transactions started
+with an asynchronous This property is only valid for asynchronous calls. + |
++ |
+
|
+
+ This is a number that specifies a predefined error code. + |
++ + | +
+
|
+
+ This is a text string that describes the error. + |
++ + | +
Remarks:
+The default contacts database is cntdb://c:contacts.cdb
.
If the contacts database is specified, the contact is imported +there. If no database is specified, the default database is used. If the default +database does not exist, it is created and the contact is imported there.
+SIM card databases only support name and number keys for +vCard.
Example code:
+ +For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.
+ + + + +