SF.net SVN: fclient: [417] trunk/sandbox/fcp2/client.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-06-29 10:59:05
|
Revision: 417
http://fclient.svn.sourceforge.net/fclient/?rev=417&view=rev
Author: jUrner
Date: 2008-06-29 03:59:13 -0700 (Sun, 29 Jun 2008)
Log Message:
-----------
get / put methods expect a key object now
Modified Paths:
--------------
trunk/sandbox/fcp2/client.py
Modified: trunk/sandbox/fcp2/client.py
===================================================================
--- trunk/sandbox/fcp2/client.py 2008-06-29 10:58:33 UTC (rev 416)
+++ trunk/sandbox/fcp2/client.py 2008-06-29 10:59:13 UTC (rev 417)
@@ -968,7 +968,7 @@
initialRequest['ProgressRequired'] = msg['Required']
initialRequest['ProgressFailed'] = msg['Failed']
initialRequest['ProgressFatalyFailed'] = msg['FatallyFailed']
- initialRequest['ProgressSucceeeded'] = msg['Succeeded']
+ initialRequest['ProgressSucceeded'] = msg['Succeeded']
self.events.RequestProgress(initialRequest)
return True
@@ -1271,7 +1271,7 @@
**messageParams
):
"""Requests a key from the node
- @param key: (str) key or Uri of the file to request (may contain prefixes like 'freenet:' or 'http://')
+ @param key: (L{key.KeyBase}) key to request
@param requestType: (L{consts.RequestType}) sub type of the message
@param userData: any non persistent data to associate to the request or None
@param persistentUserData: any string to associate to the request as persistent data or None
@@ -1279,11 +1279,8 @@
@param messageParams: keyword arguments to pass along with the ClientGet message (uppercase first letter!!).
If the value of a keyword is None, it is ignored.
- @return: (str) identifier of the request
+ @return: (str) request identifier
"""
- if hasattr(key, 'toString'):
- key = key.toString()
-
msg = message.ClientGet(URI=key)
for paramName, value in messageParams.items():
if value is not None:
@@ -1318,7 +1315,7 @@
):
"""Requests datae from the node
- @param key: (str) key or Uri of the data to request (may contain prefixes like 'freenet:' or 'http://')
+ @param key: (L{key.KeyBase}) key to request
@param allowedMimeTypes: (str) list of allowed mime types
@param binaryBlob: (bool) if True, the file is retrieved as binary blob file
@@ -1386,7 +1383,7 @@
):
"""Requests a file from the node
- @param key: (str) key or Uri of the file to request (may contain prefixes like 'freenet:' or 'http://')
+ @param key: (L{key.KeyBase}) key to request
@param filename: (full path) filename to store the file to
@param allowedMimeTypes: (str) list of allowed mime types
@@ -1451,7 +1448,7 @@
):
"""Requests info about a key
- @param key: (str) key or Uri of the file to request (may contain prefixes like 'freenet:' or 'http://')
+ @param key: (L{key.KeyBase}) key to request
@param dsOnly: if True, retrieves the file from the local data store only
@param ignoreDS: If True, ignores the local data store
@@ -1497,17 +1494,15 @@
#TESTED
def subscribeUSK(self, key, dontPoll=True):
"""Asks the node to notify the client when an USK is updated
- @param key: (str) key or Uri of the USK to subscribe to
+ @param key: (L{key.USK}) key to subscribe to
@param dontPoll: if True, does whatever ???
@return: (str) identifer of the request
- @note: this request can not be removed or modified and the {consts.RequestStatus.Completed}
+ @note: this request can not be removed or modified so the L{consts.RequestStatus.Completed}
flag is always set
@todo: looks like USK subscribes will persist untill connection is closed. Can they be removed somehow?
"""
- if hasattr(key, 'toString'):
- key = key.toString()
msg = message.SubscribeUSK(
URI=key,
DontPoll=dontPoll,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|