# class CollectionCreateJob

###

Module | akonadi
Namespace | Akonadi
Class | CollectionCreateJob
Inherits | Akonadi::Job

Job that creates a new collection in the Akonadi storage.

This job creates a new collection with all the set properties. You have to use setParentCollection() to define the collection, the new collection shall be located in.

    // create a new top-level collection
    Akonadi.Collection collection;
    collection.setParentCollection( Collection.root() );
    collection.setName( "Events" );
    collection.setContentMimeTypes( "text/calendar" );

    Akonadi.CollectionCreateJob *job = new Akonadi.CollectionCreateJob( collection );
    if ( job->exec() )
    qDebug() << "Created successfully";
    else
    qDebug() << "Error occurred";

Author Volker Krause <vkrause@kde.org>

### methods

- CollectionCreateJob (collection, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  collection | Akonadi.Collection |
  parent | QObject | 0

  Creates a new collection create job.

  collection - The new collection.

  parent - The parent object.

- collection ( )

  returns Akonadi.Collection

  Returns the created collection if the job was executed succesfull.

- doHandleResponse (tag, data)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  tag | QByteArray |
  data | QByteArray |

- doStart ( )

  returns Nothing