| libsocialweb DBus API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Implemented Interfaces | Signals | ||||
com.meego.libsocialweb.PhotoUploadcom.meego.libsocialweb.PhotoUpload — PhotoUpload interface |
UploadPhoto (in 's' local_filename, in 'a{ss}' fields, out 'i' opid)
Objects implementing com.meego.libsocialweb.PhotoUpload also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
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.
|
The local filename of the image to upload. |
|
Key-value pairs containing metadata. |
|
Operation identifier, used in 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.
|
Operation identifier, as returned by . |
|
Current progress, the normal range being 0 (not started) to 100 (completed), with -1 meaning an error occurred. |
|
The human-readable error message. This will be set if progress is -1. |