com.meego.libsocialweb.PhotoUpload

## com.meego.libsocialweb.PhotoUpload com.meego.libsocialweb.PhotoUpload — PhotoUpload interface |

## Methods

    UploadPhoto (in  's'     local_filename,
                 in  'a{ss}' fields,
                 out 'i'     opid)

## Signals

    PhotoUploadProgress ('i' opid,
                         'i' progress,
                         's' error_message)

## Implemented Interfaces

Objects implementing com.meego.libsocialweb.PhotoUpload also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

## Description

An interface for uploading photos.

## Details

### `UploadPhoto()`

    UploadPhoto (in  's'     local_filename,
                 in  'a{ss}' fields,
                 out 'i'     opid)

Upload the photo `local_filename`. The upload will be performed asynchronously and `opid` can be used to identify the upload in the "PhotoUploadProgress" signal.

`fields` is a set of key-value pairs that are passed to the service. None of these are required and not all services support all of the keys. Generic keys are:

- title: The photo's title

There are also service-specific keys for accessing features that cannot be abstracted sufficiently. These are prefixed with "x-[service name]-" to avoid conflicts and make it clear that these have specific semantics. These are:

- x-flickr-is-public: Set's the Flickr "is_public" parameter. 1 if the photos should be publically viewable, 0 otherwise.

- x-flickr-is-friend: Set's the Flickr "is_friend" parameter. 1 if the photos should be viewable by friends, 0 otherwise.

- x-flickr-is-family: Set's the Flickr "is_family" parameter. 1 if the photos should be viewable by family, 0 otherwise.

`local_filename`: | The local filename of the image to upload.
`fields`: | Key-value pairs containing metadata.
`opid`: | Operation identifier, used in the "PhotoUploadProgress" signal.

## Signal Details

### The PhotoUploadProgress signal

    PhotoUploadProgress ('i' opid,
                         'i' progress,
                         's' error_message)

Emitted periodically as the upload is performed. `progress` can go from 0 to 100 as the upload is performed. If there is an error then `progress` is -1 and `error_message` is set.

This signal is guaranteed to be emitted at least once with either `progress` at 100 (i.e. upload complete) or an error state.

`opid`: | Operation identifier, as returned by `UploadPhoto()`.
`progress`: | Current progress, the normal range being 0 (not started) to 100 (completed), with -1 meaning an error occurred.
`error_message`: | The human-readable error message. This will be set if `progress` is -1.