libmythical is the client API for connecting to the MythiCal server. It consists of a number of functions for connecting to a remote server, opening collections and retrieving/updating calendar items. Once installed, access to the libmythical client API is done through the inclusion of the libmythical.h header file.
Connect to a remote MythiCal server using the given connection information. Returns NULL on connection failure or a valid MYTHISTATE * upon success.
Disconnect from a remote MythiCal server represented by state. Returns MYTHI_ERR_SUCCESS on success or MYTHI_ERR_FAIL on error.
Open the specified collection at path using the connection state and the credentials from auth. If successful, collection will be set to point to a valid MYTHICOLLECTION structure and the function returns MYTHI_ERR_SUCCESS. If unsuccessful, collection will be set to NULL and the function will return one of either MYTHI_ERR_ACCESS_DENIED or MYTHI_ERR_FAIL.
Retrieve the named property from the given collection. Properties for collections can be one of the following:
Retrieve the unique tag for the given collection
Retrieve the display name for the given collection
Retrieve the owner of the given collection
Retrieve the backend path of the given collection
Retrieve the backend root of the given collection
Release all resources related to the collection given by collection. The function will return one of either MYTHI_ERR_SUCCESS or MYTHI_ERR_FAIL depending upon success or failure of the operation.
Search the specified collection using the set of filters given by filters, and retrieve the given properties for any matching resources as a NULL-terminated list in items. The function will return one of either MYTHI_ERR_SUCCESS or MYTHI_ERR_FAIL depending upon success or failure of the operation.
NOTE: filters is currently unimplemented and MUST be set to NULL to indicate that the server should return all resources within a collection.
Get the specified list of NULL-terminated properties from the specified list of NULL-terminated resourceids and return them in items. If successful, items will be set to point to a valid NULL-terminated MYTHIRESOURCE array and the function returns MYTHI_ERR_SUCCESS. If unsuccessful, items will be set to NULL and the function will return MYTHI_ERR_FAIL.
Put the specified list of NULL-terminated resources into the specified collection. If successful, the function returns MYTHI_ERR_SUCCESS. If unsuccessful, the function will return MYTHI_ERR_FAIL.
Delete the specified list of NULL-terminated resource ids from the specified collection. If successful, the function returns MYTHI_ERR_SUCCESS. If unsuccessful, the function will return MYTHI_ERR_FAIL.
Returns the number of resources in the NULL-terminated list items.
Retrieve the named property from the given resource. Properties for resources can be one of the following:
Retrieve the unique tag for the given resource
Retrieve the calendar entry in iCal format
Set the named property for the given resource. Properties for resources are the same as those given above for mythi_get_resource_property().
Create a new MYTHIRESOURCE with the specified resourceid. Returns NULL if resource creation failed. Note that all properties are optional, although backends may require a particular set of properties by returning a failure code when trying to upload the resulting resource to a server with mythi_put_resources().
Frees the resource given by item. Returns MYTHI_ERR_SUCCESS on success.
Frees the NULL-terminated resource list given by items. Returns MYTHI_ERR_SUCCESS on success.