Job that creates a new item in the Akonadi storage.
This job creates a new item with all the set properties in the
given target collection.
Example:
// Create a contact item in the root collection
KABC.Addressee addr;
addr.setNameFromString( "Joe Jr. Miller" );
Akonadi.Item item;
item.setMimeType( "text/directory" );
item.setPayload( addr );
Akonadi.Collection collection = Akonadi.Collection.root();
Akonadi.ItemCreateJob *job = new Akonadi.ItemCreateJob( item, collection );
if ( job->exec() )
qDebug() << "Contact item created successfully";
else
qDebug() << "Error occurred";
Author Volker Krause
|