create_resource_sync


Description:

public virtual bool create_resource_sync (Source source, Cancellable? cancellable = null) throws Error

Creates a server-side resource described by source.

For example, if source describes a new calendar, an equivalent calendar is created on the server.

It is the implementor's responsibility to examine source and determine what the equivalent server-side resource would be. If this cannot be determined without ambiguity, the function must return an error.

After the server-side resource is successfully created, the implementor must also add an Source to this's server. This can either be done immediately or in response to some "resource created" notification from the server. The added Source can be source itself or a different Source instance that describes the new resource.

If an error occurs, the function will set throws and return false.

Parameters:

this

an CollectionBackend

source

an Source

cancellable

optional Cancellable object, or null

Returns:

true on success, false on failure