0-th
org.freedesktop.Telepathy.Connection.Interface.FileSharing.DRAFT
Implementations of this interface must also implement:
* org.freedesktop.Telepathy.Connection
An interface on connections to support protocols which allow users to designate a set of files as available for retrieval by other users of their choosing. Other features specified by this interface include file metadata, revisions, and download mirrors.
Methods:
CreateFileListing ( s: Title, s: PubSubNodeName, s: Description)-> b
In order to be able to publish a file on a PubSub server one should have a PubSub node. Here the Discription parameter is optional. Returns whether the FileListing was created ('true') or not ('false').
Parameters
Title - s This will be the title of the pubsub node.
PubSubNodeName - s This is how the repository of the user will be referenced.
Discription - s This is optional and can be use to give the discription of the FileListing that is being created.
Returns
Returns 'true' if the FileListing was created and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
AddSubSection ( s: Title, s: PubSubNodeName, s: SubSectionPubSubNodeName, s: Description) -> b
This method is called in order to add a SubSection to an already existing PubSubNode. This method returns whether the creation of the SubSection was successful ('true') or not ('false').
Parameters
Title - s This will be the title of the subsection.
PubSubNodeName - s This is how the repository of the user will be referenced.
SubSectionPubSubNodeName - s This is how the SubSection will be referenced.
Discription - s This is optional and can be use to give the discription of the SubSection that is being created.
Returns
Returns 'true' if the SubSection was created and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNodeName specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
SuscribeList ( s: PubSubNodeToSubscribe, s: SubscriptionType, s: SubscriptionDepth) -> b
This method is called when one wants to suscribe to a FileList. This method returns whether the subscription was successful ('true') or not ('false').
Parameters
PubSubNodeToSubscribe - s This is the PubSub node user want to subscibe.
SubscriptionType - s This gives the subscription type.
SubscriptionDepth - s Since a pubsub FileListing might have many SubSections,therefore this parameter gives the depth a user want to subscribe to.
Returns
Returns 'true' if the SubSection was created and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNodeToSubscribe specified is unknown on this channel or connection. (generic description)
PublishFile ( s: PubSubNodeToAddFile, s: Filename, q: ItemId, as: Metadata, s: Mirrors) -> b
This method is called in order to to add a file to the list of published files. This method returns whether the file was published successfully ('true') or not ('false').
Parameters
PubSubNodeToAddFile - s This is the PubSub node user want to publish file to.
Filename - s This is the FileName user want to publish.
ItemId - q This Id is used to create more than one version of the same file.
Metadata - as This list all the metadata about the file which includes Size,Modified,CheckSum,Ckecksumtype and Mime.
Mirrors - s This list the mirrors from where the file can be fetched.
Return
Returns 'true' if the FileName was published and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNodeToAddFile specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied The user is not permitted to perform the requested operation. (generic description)
DeleteRevision ( s: PubSubNode, q: FileItemId) -> b
This method is called in order to delete a revision from the list of published files on a PubSubNode. This method returns whether the file was deleted successfully ('true') or not ('false').
Parameters
PubSubNode - s This is the pubsub node which is holding the file with the ItemId equal to FileItemId
FileItemId - q This is the ItemId of the FileName that has to be deleted
Return
Returns 'true' if the FileItemId was deleted and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNode specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied The user is not permitted to perform the requested operation. (generic description)
MakeRevision ( s: PubSubNodeHostingFile, s: Filename, q: ItemId, as: Metadata, s: Mirrors) -> b
This method is called in order to make a revision to an existing file on a PubSubNode. Use a different ItemId than the original file. This method returns whether the file was revised successfully ('true') or not ('false').
Parameters
PubSubNodeHostingFile - s This is the PubSub node user want to publish file to.
Filename - s This is the FileName user want to publish.
ItemId - q This Id is used to create more than one version of the same file.
Metadata - as This list all the metadata about the file which includes Size,Modified,CheckSum,Ckecksumtype and Mime.
Mirrors - s This list the mirrors from where the file can be fetched.
Return
Returns 'true' if the FileName was published and 'false' if it was not.
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNodeHostingFile specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied The user is not permitted to perform the requested operation. (generic description)
SetPermissions ( s: PubSubNode, s: Jid, s: Affilation) -> Nothing
This method is called in order to set permissions for users regarding a PubSubNode. This method returns whether the file was revised successfully ('true') or not ('false').
Parameter
PubSubNode - s This is the PubSub node user want to change permission of.
Jid - s Jid of the user whose permission/affilation are being changed.
Affilation - s This is the permission that will be set gor the Jid
Return
Nothing
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNode specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied The user is not permitted to perform the requested operation. (generic description)
GetRepo( s: PubSubNode) -> as
This method is called to request the Repo hosted on the PubSubNode .
Parameter
PubSubNode - s The PubSub node on which the file repository is hosted.
Return
Returns an array of strings
Possible Error
org.freedesktop.Telepathy.Error.Disconnected The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
org.freedesktop.Telepathy.Error.InvalidHandle
The PubSubNode specified is unknown on this channel or connection. (generic description)
RequestFile() -> nothing
In order to request for a file to be sent one must request a FileSharing channel for the mirror hosting the file including the following mandatory properties (Protocol, FileId). After this RequestFile is called to to configure the socket that will be used to complete this operation.
Signals :
NotificationChange( s: PubSubNodeModified, s: CollectionModified, s: Title, as: Metadata, s: Mirror)
This signal is sent to every user which is subscribed to the PubSubNode in which the change has been made.
Parameter
PubSubNodeModified - s This is the PubSub node on which the change has been done
CollectionModified - s This is collection on PubSub node which has been change
Title - s This is the Title of the collection which has been modified
Metadata - as This is the Metadata of the file which has been added/deleted
Mirror - s Mirror of the modified file.
Structure types
Metadata ( u: Size, s: Modified, s: CheckSum, s: Checksumtype, s: Mime )
This represents all the information needed about the file.
Members
Size - s Size of the file in KB
Modified - s (undocumented)
CheckSum - s Checksum of the file
Checksumtype - s The type of CheckSum used
Mime - s Mime Type of the file