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
;
38 + (id
)createFromEC
:(ECTagMD5
*) tag
;
40 - (void)updateFromEC
:(ECTagMD5
*) tag
;
42 - (NSString
*)prioToString
:(int)prio
;
44 @
property (readonly
) int src_count
;
45 @
property (readonly
) int non_current_src_count
;
46 @
property (readonly
) int xfer_src_count
;
47 @
property (readonly
) int a4af_src_count
;
49 @
property (readonly
) int speed
;
51 @
property (readonly
) uint64_t size_done
;
52 @
property (readonly
) uint64_t size_xfer
;
56 @interface SearchFile
: amuleFile
{
60 + (id
)createFromEC
:(ECTagMD5
*) tag
;
62 - (void)updateFromEC
:(ECTagMD5
*) tag
;
64 @
property (readonly
) int src_count
;
68 @interface amuleFileSet
: NSObject
{
69 NSMutableDictionary
*m_file_dict
;
70 NSMutableArray
*m_file_array
;
79 - (void)insertObject
:(id
)object
;
81 - (id
)objectAtIndex
:(int)index
;
82 - (id
)objectForKey
:(id
)key
;
84 - (void)removeAtIndex
:(int)index
;
85 - (void)removeAtKey
:(id
)key
;
87 - (void)setGuiController
:(id
)controller
;
93 @interface amuleData
: NSObject
{
99 bool m_ed2k_connected
;
100 bool m_kad_connected
;
101 NSString
*m_ed2k_server
;
105 amuleFileSet
*m_downloads
;
106 amuleFileSet
*m_shared
;
111 bool m_search_running
;
112 amuleFileSet
*m_search_results
;
114 ECRemoteConnection
*m_connection
;
117 + (id
)initWithConnection
:(ECRemoteConnection
*) connection
;
122 - (void)handlePacket
:(ECPacket
*) packet
;
125 - (void)handleDownloadQueueUpdate
:(ECPacket
*) packet
;
126 - (void)handleStatusUpdate
:(ECPacket
*) packet
;
128 - (void)startSearch
:(NSString
*)text searchType
:(EC_SEARCH_TYPE
)searchType
129 minSize
:(uint64_t)minSize maxSize
:(uint64_t)maxSize avail
:(uint32_t)avail
;
132 @
property (readonly
) amuleFileSet
*downloads
;
133 @
property (readonly
) amuleFileSet
*shared
;
134 @
property (readonly
) amuleFileSet
*search_resuls
;