Changes

Jump to navigation Jump to search
7,218 bytes added ,  04:54, 7 April 2009
no edit summary
Line 1: Line 1: −
'''org.freedesktop.Telepathy.channel.Type.FileSharing'''
+
'''org.freedesktop.Telepathy.Connection.Interface.FileSharing.DRAFT'''
    
Implementations of this interface must also implement:
 
Implementations of this interface must also implement:
   '' org.freedesktop.Telepathy.Channel ''
+
   ''* 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.
 +
   
 
      
 
      
*In order to be able to publish a file on a PubSub server one should have a PubSub node. For this one must request a FileSharing channel for a PubSub server, including the following mandatory properties (Title, PubSubNodeName) and the follwing optional properties (Description). After this, one should call CreateFileListing to configure the socket that will be used to complete this operation.
+
'''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, u: Size, 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, u: Size, s: Modified, s: CheckSum, s: Ckecksumtype, s: Mime, 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
 +
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.
 +
 +
 +
 
 +
 
   −
*In order to add a SubSection to an already existing PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server, including the following mandatory properties (Title, ParentPubSubNodeName, SubSectionPubSubNodeName) and the follwing optional properties (Description). After this, one should call AddSubSection to configure the socket that will be used to complete this operation.
     −
*In order to Subscribe to a FileListing on an existing PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server, including the following mandatory properties (PubSubNodeToSubscribe, SubscriptionType, SubscriptionDepth). After this, one should call SuscribeList 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
   −
*In order to add a file to the list of published files on a PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server, including the following mandatory properties (PubSubNodeToAddFile, Filename, ItemId, Size, Modified, Checksum, ChecksumType, Mime, Mirrors) and the following optional properties (Description). After this, one should call PublishFile to configure the socket that will be used to complete this operation.  
+
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.
 +
 +
   −
*In order to delete a revision from the list of published files on a PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server, including the following mandatory properties (FileItemId). After this, one should call DeleteRevision to configure the socket that will be used to complete this operation.
     −
*In order to make a revision to an existing file on a PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server, including the following mandatory properties (PubSubNodeHostingFile,  Filename, ItemId, Size, Modified, Checksum, ChecksumType, Mime, Mirrors). After this, one should call MakeRevision to configure the socket that will be used to complete this operation.
     −
*In order to set permissions for users regarding a PubSubNode on a PubSub server one must request a FileSharing channel for a PubSub server,  including the following mandatory properties (PubSubNode, Jid, Affilation). After this, one should call SetPermissions to configure the socket that will be used to complete this operation.
+
'''Structure types'''
   −
*In order to request a File Repository one must request a FileSharing channel for the User whose list is being requested and then call GetRepo to configure the socket that will be used to complete this operation..
+
Metadata ( u: Size, s: Modified, s: CheckSum, s: Checksumtype, s: Mime )
   −
*In order to send a list of published files in response to GetRepo one must request a FileSharing channel for the User which called GetRepo including the following mandatory properties (RepoAddress, PubSubNodeHostingRepo, Description). After this one should call SendRepo to configure the socket that will be used to complete this operation.
+
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
   −
*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.
+
Checksumtype - s
 +
The type of CheckSum used
 +
 +
Mime - s
 +
Mime Type of the file
29

edits

Navigation menu