SF.net SVN: fclient: [153] trunk/sandbox/fcp/fcp2_0_consts.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-02-05 15:59:43
|
Revision: 153
http://fclient.svn.sourceforge.net/fclient/?rev=153&view=rev
Author: jurner
Date: 2008-02-05 07:59:49 -0800 (Tue, 05 Feb 2008)
Log Message:
-----------
adapt to request status flag changes
Modified Paths:
--------------
trunk/sandbox/fcp/fcp2_0_consts.py
Modified: trunk/sandbox/fcp/fcp2_0_consts.py
===================================================================
--- trunk/sandbox/fcp/fcp2_0_consts.py 2008-02-05 15:58:32 UTC (rev 152)
+++ trunk/sandbox/fcp/fcp2_0_consts.py 2008-02-05 15:59:49 UTC (rev 153)
@@ -166,7 +166,7 @@
@cvar HandleNever: don't handle filename collisions
@cvar HandleRename: rename file on collisions
@cvar MaskHandle: bitmask indicating if collisions are hadled or not
- @cvar CollisonHandled: if this bit is set, a collision has been handled
+ @cvar CollisonHandled: if this bit is set, a collision has actually been handled
"""
HandleNever = 0x0
HandleRename = 0x1
@@ -187,8 +187,6 @@
TypesAll = (SSK, KSK, CHK, USK, SVK)
-
-
class LogMessages:
"""Strings used for log infos"""
@@ -275,14 +273,13 @@
UnknownNodeIdentifier = 'UnknownNodeIdentifier'
UnknownPeerNoteType = 'UnknownPeerNoteType'
URIGenerated = 'URIGenerated'
-
-
+
# client s (internal use only)
ClientSocketTimeout = 1
ClientSocketDied = 2
ClientDisconnected = 3
- ClientRequestMessages = (
+ ClientKeyRequestMessages = (
ClientGet,
ClientPut,
ClientPutDiskDir,
@@ -294,30 +291,35 @@
)
-
class RequestStatus:
"""Request status flags
@cvar Null: no status
@cvar Pending: the request is not started yet
+ @cvar Started: the request has started
@cvar Compressing: the request is about to be compressed
@cvar Compressed: compressing is completed
- @cvar Complete: the request is completed
- @cvar Error: an error occured while processing ther request
+ @cvar Complete: the request has completed successfuly
+ @cvar Error: the request has completed with an error
@cvar Removed: the request is no longer present in the client (and on the nodes queue)
+ @cvar MaskProcessed: bitmask checking if a request is completely processed (either
+ successfuly completed or completed with an error or removed)
+
@note: the FcStatus member of the params dict of a request should contain one or more
of the bitflags it picked up while running through the client.
"""
Null = 0x0
Pending = 0x1
- Compressing = 0x2
- Compressed = 0x4
- Started = 0x8
+ Started = 0x2
+ Compressing = 0x4
+ Compressed = 0x8
Complete = 0x10
Error = 0x20
Removed = 0x40
-
+
+ MaskProcessed = Complete | Error | Removed
+
class RequestSubType:
"""Consts indicating the subtype of a message"""
@@ -330,7 +332,6 @@
PutComplexDir = 6
-
#TODO: no idea how fcp handles strings as in <Peer volatile.status=CONNECTED>
# all I could find in the sources where these constants as in PEER_NODE_STATUS_CONNECTED
# in --> freenet/node/PeerManager.java
@@ -349,10 +350,12 @@
ConnError = 12
Disconnecting = 13
+
class PeerNoteType:
"""All known peer note types"""
Private = '1'
+
class Persistence:
Connection = 'connection'
Reboot = 'reboot'
@@ -384,7 +387,6 @@
PriorityClass = 0x2
-
class ReturnType:
Direct = 'direct'
Disk = 'disk'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|