Advertisement
Guest User

kartik rustagi

a guest
Apr 10th, 2009
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.23 KB | None | 0 0
  1. org.freedesktop.Telepathy.Connection.Interface.FileSharing.DRAFT
  2.  
  3. Implementations of this interface must also implement:
  4. * org.freedesktop.Telepathy.Connection
  5.  
  6.  
  7. 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.
  8.  
  9.  
  10.  
  11. Methods:
  12.  
  13. CreateFileListing ( s: Title, s: File_Listing, s: Description)-> b
  14.  
  15. In order to be able to publish a file one should have a File_Listing node. Here the Discription parameter is optional. Returns whether the File_Listing was created ('true') or not ('false').
  16.  
  17. Parameters
  18.  
  19. Title - s
  20. This will be the title of the File_Listing.
  21.  
  22. File_Listing - s
  23. This is how the File_Listing of the user will be referenced.
  24.  
  25. Discription - s
  26. This is optional and can be use to give the discription of the File_Listing that is being created.
  27.  
  28.  
  29. Returns
  30.  
  31. Returns 'true' if the File_Listing was created and 'false' if it was not.
  32.  
  33.  
  34. Possible Error
  35.  
  36. org.freedesktop.Telepathy.Error.Disconnected
  37. 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.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. AddSubSection ( s: Title, s: File_Listing_Parent, s: File_Listing_Derived, s: Description) -> b
  49.  
  50. This method is called in order to add a SubSection (File_Listing_Derived) to an already existing File_Listing (File_Listing_Parent). This method returns whether the creation of the SubSection was successful ('true') or not ('false').
  51.  
  52. Parameters
  53.  
  54. Title - s
  55. This will be the title of the subsection.
  56.  
  57. File_Listing_Parent - s
  58. This is how the repository of the user will be referenced.
  59.  
  60. File_Listing_Derived - s
  61. This is how the SubSection will be referenced.
  62.  
  63. Discription - s
  64. This is optional and can be use to give the discription of the SubSection that is being created.
  65.  
  66.  
  67. Returns
  68.  
  69. Returns 'true' if the SubSection was created and 'false' if it was not.
  70.  
  71.  
  72. Possible Error
  73.  
  74. org.freedesktop.Telepathy.Error.Disconnected
  75. 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.
  76.  
  77. org.freedesktop.Telepathy.Error.InvalidHandle
  78. The File_Listing_Parent specified is unknown on this channel or connection. (generic description)
  79.  
  80. org.freedesktop.Telepathy.Error.PermissionDenied
  81. The user is not permitted to perform the requested operation. (generic description)
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90. SuscribeList ( s: File_List, s: Subscription_Type, s: Subscription_Depth) -> b
  91.  
  92. This method is called when one wants to suscribe to a File_List. This method returns whether the subscription was successful ('true') or not ('false').
  93. note: "no-ops" for AIM
  94.  
  95. Parameters
  96.  
  97. File_List - s
  98. This is the File_List user wants to subscibe.
  99.  
  100. Subscription_Type - s
  101. This gives the subscription type.
  102.  
  103. Subscription_Depth - s
  104. Since a pubsub FileListing might have many SubSections,therefore this parameter gives the depth a user want to subscribe to.
  105.  
  106.  
  107. Returns
  108.  
  109. Returns 'true' if the subscription was done and 'false' if it was not.
  110.  
  111.  
  112.  
  113. Possible Error
  114.  
  115. org.freedesktop.Telepathy.Error.Disconnected
  116. 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.
  117.  
  118. org.freedesktop.Telepathy.Error.InvalidHandle
  119. The File_List specified is unknown on this channel or connection. (generic description)
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. UnSuscribeList ( s: File_List) -> b
  129.  
  130. This method is called when one wants to unsuscribe to a File_List. This method returns whether the subscription was successful ('true') or not ('false').
  131. note: "no-ops" for AIM
  132.  
  133. Parameters
  134.  
  135. File_List - s
  136. This is the File_List user wants to unsubscibe from
  137.  
  138.  
  139. Returns
  140.  
  141. Returns 'true' if the unsubscription was done and 'false' if it was not.
  142.  
  143.  
  144.  
  145. Possible Error
  146.  
  147. org.freedesktop.Telepathy.Error.Disconnected
  148. 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.
  149.  
  150. org.freedesktop.Telepathy.Error.InvalidHandle
  151. The File_List specified is unknown on this channel or connection. (generic description)
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. PublishFile ( s: File_List, s: Filename, q: ItemId, as: Metadata, s: Mirrors) -> b
  160.  
  161. This method is called in order to to add a file to the File_List of published files. This method returns whether the file was published successfully ('true') or not ('false').
  162.  
  163. Parameters
  164.  
  165. File_List - s
  166. This is the File_List user wants to publish file to.
  167.  
  168. Filename - s
  169. This is the FileName user want to publish.
  170.  
  171. ItemId - q
  172. This Id is used to create more than one version of the same file.
  173.  
  174. Metadata - as
  175. This list all the metadata about the file which includes Size,Modified,CheckSum,Ckecksumtype and Mime.
  176.  
  177. Mirrors - s
  178. This list the mirrors from where the file can be fetched.
  179.  
  180.  
  181. Return
  182. Returns 'true' if the Filename was published and 'false' if it was not.
  183.  
  184.  
  185. Possible Error
  186.  
  187. org.freedesktop.Telepathy.Error.Disconnected
  188. 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.
  189.  
  190. org.freedesktop.Telepathy.Error.InvalidHandle
  191. The File_List specified is unknown on this channel or connection. (generic description)
  192.  
  193. org.freedesktop.Telepathy.Error.PermissionDenied
  194. The user is not permitted to perform the requested operation. (generic description)
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. DeleteRevision ( s: File_List, q: File_Item_Id) -> b
  202.  
  203. This method is called in order to delete a revision from the list of published files on a File_List. This method returns whether the file was deleted successfully ('true') or not ('false').
  204.  
  205.  
  206. Parameters
  207.  
  208. File_List - s
  209. This is the File_List which is holding the file with the Item_Id equal to File_Item_Id
  210.  
  211. File_Item_Id - q
  212. This is the ItemId of the FileName that has to be deleted
  213.  
  214.  
  215. Return
  216. Returns 'true' if the FileItemId was deleted and 'false' if it was not.
  217.  
  218.  
  219. Possible Error
  220.  
  221. org.freedesktop.Telepathy.Error.Disconnected
  222. 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.
  223.  
  224. org.freedesktop.Telepathy.Error.InvalidHandle
  225. The File_List specified is unknown on this channel or connection. (generic description)
  226.  
  227. org.freedesktop.Telepathy.Error.PermissionDenied
  228. The user is not permitted to perform the requested operation. (generic description)
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236. MakeRevision ( s: File_List, s: Filename, q: ItemId, as: Metadata, s: Mirrors) -> b
  237.  
  238. This method is called in order to make a revision to an existing file on File_List. Use a different ItemId than the original file. This method returns whether the file was revised successfully ('true') or not ('false').
  239.  
  240.  
  241. Parameters
  242.  
  243. File_List - s
  244. This is the File_List on which the file user want to make revision to is listed.
  245.  
  246. Filename - s
  247. This is the FileName user want to publish.
  248.  
  249. ItemId - q
  250. This Id is used to create more than one version of the same file.
  251.  
  252. Metadata - as
  253. This list all the metadata about the file which includes Size,Modified,CheckSum,Ckecksumtype and Mime.
  254.  
  255. Mirrors - s
  256. This list the mirrors from where the file can be fetched.
  257.  
  258.  
  259. Return
  260. Returns 'true' if the FileName was published and 'false' if it was not.
  261.  
  262.  
  263. Possible Error
  264.  
  265. org.freedesktop.Telepathy.Error.Disconnected
  266. 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.
  267.  
  268. org.freedesktop.Telepathy.Error.InvalidHandle
  269. The File_List specified is unknown on this channel or connection. (generic description)
  270.  
  271. org.freedesktop.Telepathy.Error.PermissionDenied
  272. The user is not permitted to perform the requested operation. (generic description)
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280. SetPermissions ( s: File_List, u: User_Handle, s: Affilation) -> Nothing
  281.  
  282. This method is called in order to set permissions for users regarding a File_List owned by an owner. This method returns whether permissions were set successfully ('true') or not ('false').
  283.  
  284.  
  285. Parameter
  286.  
  287. File_List - s
  288. This is the File_List owner want to change permission of.
  289.  
  290. UserHandle - u
  291. UserHandle of the user whose permission/affilation are being changed.
  292.  
  293. Affilation - s
  294. This is the permission that will be set for the User_Handle
  295.  
  296.  
  297. Return
  298. Nothing
  299.  
  300.  
  301. Possible Error
  302.  
  303. org.freedesktop.Telepathy.Error.Disconnected
  304. 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.
  305.  
  306. org.freedesktop.Telepathy.Error.InvalidHandle
  307. The File_List specified is unknown on this channel or connection. (generic description)
  308.  
  309. org.freedesktop.Telepathy.Error.PermissionDenied
  310. The user is not permitted to perform the requested operation. (generic description)
  311.  
  312.  
  313.  
  314.  
  315.  
  316. GetRepoList( u: User_Handle ) -> as
  317.  
  318. This method is called to request the File_list which are hosted by User_Handle.
  319.  
  320. Parameter
  321.  
  322. User_Handle - u
  323. The Contact_Handle of the user whose list of hosted File_List is being requested.
  324.  
  325.  
  326. Return
  327. Returns an array of strings where each string represents a File_List hosted by the User.
  328.  
  329.  
  330.  
  331. Possible Error
  332.  
  333. org.freedesktop.Telepathy.Error.Disconnected
  334. 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.
  335.  
  336. org.freedesktop.Telepathy.Error.InvalidHandle
  337. The User_handle specified is unknown on this channel or connection. (generic description)
  338.  
  339. org.freedesktop.Telepathy.Error.PermissionDenied
  340. The user is not permitted to perform the requested operation. (generic description)
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351. GetFileList( s: File_List, u: User_Handle ) -> as
  352.  
  353. This method is called to request the list of files in a File_List hosted by the user with Contact_Handle as User_Handle.
  354.  
  355. Parameter
  356.  
  357. File_List - s
  358. This is the File_List whose list of included file is being requested
  359.  
  360. User_Handle - u
  361. The Contact_Handle of the user whose list of hosted File_List is being requested.
  362.  
  363.  
  364. Return
  365. Returns an array of strings where each string represents a Filename hosted by the User. If their is a Subsection at the same hierarchy level, it is aso retturned in this array.
  366.  
  367.  
  368.  
  369. Possible Error
  370.  
  371. org.freedesktop.Telepathy.Error.Disconnected
  372. 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.
  373.  
  374. org.freedesktop.Telepathy.Error.InvalidHandle
  375. The File_List/User_handle specified is unknown on this channel or connection. (generic description)
  376.  
  377. org.freedesktop.Telepathy.Error.PermissionDenied
  378. The user is not permitted to perform the requested operation. (generic description)
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387. RequestFile(s: File_List, u: User_Handle, s: Filename) -> nothing
  388.  
  389. 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.
  390.  
  391.  
  392. Parameter
  393.  
  394. File_List - s
  395. This is the File_List whose list of included file is being requested
  396.  
  397. User_Handle - u
  398. The Contact_Handle of the user whose list of hosted File_List is being requested.
  399.  
  400. Filename - s
  401. File which is being requested to be sent
  402.  
  403. Possible Error
  404.  
  405. org.freedesktop.Telepathy.Error.Disconnected
  406. 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.
  407.  
  408. org.freedesktop.Telepathy.Error.InvalidHandle
  409. The File_List/User_handle specified is unknown on this channel or connection. (generic description)
  410.  
  411. org.freedesktop.Telepathy.Error.PermissionDenied
  412. The user is not permitted to perform the requested operation. (generic description)
  413.  
  414.  
  415.  
  416.  
  417. Signals
  418.  
  419. NotificationChange( s: File_List, s: File_List_Title, s: Filename_Modified, s: Description, as: Metadata, s: Mirror)
  420.  
  421. This signal is sent to every user which is subscribed to the File_List in which the change has been made.
  422.  
  423. Parameter
  424.  
  425. File_List - s
  426. This is the File_List on which the change has been done
  427.  
  428. File_List_Title - s
  429. This is the title of the File_List which has been modified
  430.  
  431. Filename_Modified - s
  432. This is Filename on File_List which has been changed
  433.  
  434. Discription - s
  435. This is the Discripton of the File_List which has been modified
  436.  
  437. Metadata - as
  438. This is the Metadata of the file which has been added/deleted
  439.  
  440. Mirror - s
  441. Mirror of the modified file.
  442.  
  443.  
  444.  
  445.  
  446.  
  447. Structure types
  448.  
  449. Metadata ( u: Size, s: Modified, s: CheckSum, s: Checksumtype, s: Mime )
  450.  
  451. This represents all the information needed about the file.
  452.  
  453. Members
  454.  
  455. Size - s
  456. Size of the file in KB
  457.  
  458. Modified - s
  459. The last modified time of the revision
  460.  
  461. CheckSum - s
  462. Checksum of the file
  463.  
  464. Checksumtype - s
  465. The type of CheckSum used
  466.  
  467. Mime - s
  468. Mime Type of the file
  469.  
  470.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement