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
{
62 int m_complete_src_count
;
68 + (id
)createFromEC
:(ECTagMD5
*) tag
;
70 - (void)updateFromEC
:(ECTagMD5
*) tag
;
72 @
property (readonly
) int src_count
;
73 @
property (readonly
) int complete_src_count
;
77 @interface SharedFile
: amuleFile
{
81 int m_accept_count_all
;
84 uint64_t m_size_xfer_all
;
90 + (id
)createFromEC
:(ECTagMD5
*) tag
;
92 - (void)updateFromEC
:(ECTagMD5
*) tag
;
94 - (NSString
*)prioToString
:(int)prio
;
96 @
property (readonly
) int req_count
;
97 @
property (readonly
) int req_count_all
;
98 @
property (readonly
) int accept_count
;
99 @
property (readonly
) int accept_count_all
;
101 @
property (readonly
) uint64_t size_xfer
;
102 @
property (readonly
) uint64_t size_xfer_all
;
104 @
property (readonly
) int prio
;
105 @
property (copy
, readonly
) NSString
* sprio
;
109 @interface amuleFileSet
: NSObject
{
110 NSMutableDictionary
*m_file_dict
;
111 NSMutableArray
*m_file_array
;
120 - (void)insertObject
:(id
)object
;
122 - (id
)objectAtIndex
:(int)index
;
123 - (id
)objectForKey
:(id
)key
;
125 - (void)removeAtIndex
:(int)index
;
126 - (void)removeAtKey
:(id
)key
;
128 - (void)setGuiController
:(id
)controller
;
134 @interface amuleData
: NSObject
{
140 bool m_ed2k_connected
;
141 bool m_kad_connected
;
142 NSString
*m_ed2k_server
;
146 amuleFileSet
*m_downloads
;
147 amuleFileSet
*m_shared
;
152 bool m_search_running
;
153 amuleFileSet
*m_search_results
;
155 ECRemoteConnection
*m_connection
;
158 + (id
)initWithConnection
:(ECRemoteConnection
*) connection
;
163 - (void)handlePacket
:(ECPacket
*) packet
;
166 - (void)handleDownloadQueueUpdate
:(ECPacket
*) packet
;
167 - (void)handleSharedFilesUpdate
:(ECPacket
*) packet
;
168 - (void)handleSearchUpdate
:(ECPacket
*) packet
;
170 - (void)handleStatusUpdate
:(ECPacket
*) packet
;
172 - (void)startSearch
:(NSString
*)text searchType
:(EC_SEARCH_TYPE
)searchType
173 minSize
:(uint64_t)minSize maxSize
:(uint64_t)maxSize avail
:(uint32_t)avail
;
176 @
property (readonly
) amuleFileSet
*downloads
;
177 @
property (readonly
) amuleFileSet
*shared
;
178 @
property (readonly
) amuleFileSet
*search_resuls
;