1 #import <Cocoa/Cocoa.h>
5 @interface amuleFile
: NSObject
{
14 - (BOOL
)isEqual
: (id
) object
;
16 - (NSString
*)convertWithPrefix
:(uint64_t)number
;
18 @
property (readonly
) NSString
*name
;
19 @
property (readonly
) uint64_t size
;
23 @interface DownloadingFile
: amuleFile
{
25 int m_non_current_src_count
;
39 + (id
)createFromEC
:(ECTagMD5
*) tag
;
41 - (void)updateFromEC
:(ECTagMD5
*) tag
;
43 - (NSString
*)prioToString
:(int)prio
;
45 @
property (readonly
) int src_count
;
46 @
property (readonly
) int non_current_src_count
;
47 @
property (readonly
) int xfer_src_count
;
48 @
property (readonly
) int a4af_src_count
;
50 @
property (readonly
) int speed
;
52 @
property (readonly
) uint64_t size_done
;
53 @
property (readonly
) uint64_t size_xfer
;
55 @
property (readonly
) int prio
;
56 @
property (copy
, readonly
) NSString
* sprio
;
60 @interface SearchFile
: amuleFile
{
64 + (id
)createFromEC
:(ECTagMD5
*) tag
;
66 - (void)updateFromEC
:(ECTagMD5
*) tag
;
68 @
property (readonly
) int src_count
;
72 @interface amuleFileSet
: NSObject
{
73 NSMutableDictionary
*m_file_dict
;
74 NSMutableArray
*m_file_array
;
83 - (void)insertObject
:(id
)object
;
85 - (id
)objectAtIndex
:(int)index
;
86 - (id
)objectForKey
:(id
)key
;
88 - (void)removeAtIndex
:(int)index
;
89 - (void)removeAtKey
:(id
)key
;
91 - (void)setGuiController
:(id
)controller
;
97 @interface amuleData
: NSObject
{
103 bool m_ed2k_connected
;
104 bool m_kad_connected
;
105 NSString
*m_ed2k_server
;
109 amuleFileSet
*m_downloads
;
110 amuleFileSet
*m_shared
;
115 bool m_search_running
;
116 amuleFileSet
*m_search_results
;
118 ECRemoteConnection
*m_connection
;
121 + (id
)initWithConnection
:(ECRemoteConnection
*) connection
;
126 - (void)handlePacket
:(ECPacket
*) packet
;
129 - (void)handleDownloadQueueUpdate
:(ECPacket
*) packet
;
130 - (void)handleStatusUpdate
:(ECPacket
*) packet
;
132 - (void)startSearch
:(NSString
*)text searchType
:(EC_SEARCH_TYPE
)searchType
133 minSize
:(uint64_t)minSize maxSize
:(uint64_t)maxSize avail
:(uint32_t)avail
;
136 @
property (readonly
) amuleFileSet
*downloads
;
137 @
property (readonly
) amuleFileSet
*shared
;
138 @
property (readonly
) amuleFileSet
*search_resuls
;