Updated Russian documentation by Morse.
[amule.git] / src / GuiEvents.h
blob9933ee5892b16c9f01f8067fe9676dcfc8541c53
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2004-2011 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Copyright (c) 2004-2011 Angel Vidal ( kry@amule.org )
6 // Copyright (c) 2004-2011 Froenchenko Leonid (lfroen@users.sourceforge.net)
7 //
8 // Any parts of this program derived from the xMule, lMule or eMule project,
9 // or contributed by third-party developers are copyrighted by their
10 // respective authors.
12 // This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #ifndef GUIEVENTS_H
28 #define GUIEVENTS_H
30 #include <wx/event.h>
32 #include "Types.h"
33 #include "Constants.h"
34 #define __need_convertinfo // We need only the ConvertInfo struct from PartFileConvert.h
35 #include "PartFileConvert.h"
37 class CKnownFile;
38 class CSearchFile;
39 class CPartFile;
40 class CServer;
41 class CFriend;
42 class CClientRef;
45 DECLARE_LOCAL_EVENT_TYPE(MULE_EVT_NOTIFY, -1)
48 /**
49 * This namespaces contains a number of functions and classes
50 * related to defered function calls, allowing a notification
51 * call to be delayed till it can be initiated from the main
52 * thread.
54 namespace MuleNotify
56 /**
57 * Creates a deep copy of the object passed.
59 * Note that this function should be overwritten as
60 * needed. See the wxString version below.
62 template <class ValueType>
63 inline ValueType DeepCopy(const ValueType& value)
65 return ValueType(value);
68 /** Special DeepCopy for wxString, which uses reference counting. */
69 inline wxString DeepCopy(const wxString& value)
71 return wxString(value.c_str(), value.Length());
75 ////////////////////////////////////////////////////////////
76 // Notification handlers
78 // These functions should not be called directly, but
79 // through the Notify_*, etc. macros.
82 void SharedFilesShowFile(CKnownFile* file);
83 void SharedFilesRemoveFile(CKnownFile* file);
84 void SharedFilesRemoveAllFiles();
85 void SharedFilesShowFileList();
86 void SharedFilesUpdateItem(CKnownFile* file);
88 void DownloadCtrlUpdateItem(const void* item);
89 void SourceCtrlUpdateSource(uint32 source, SourceItemType type);
90 void DownloadCtrlAddFile(CPartFile* file);
91 void SourceCtrlAddSource(CPartFile* owner, CClientRef source, SourceItemType type);
92 void DownloadCtrlRemoveFile(CPartFile* file);
93 void SourceCtrlRemoveSource(uint32 source, const CPartFile* owner);
94 void DownloadCtrlHideSource(CPartFile* file);
95 void DownloadCtrlSort();
96 void DownloadCtrlDoItemSelectionChanged();
98 void SharedCtrlAddClient(CKnownFile* owner, CClientRef client, SourceItemType type);
99 void SharedCtrlRefreshClient(uint32 client, SourceItemType type);
100 void SharedCtrlRemoveClient(uint32 client, const CKnownFile* owner);
102 void ServerAdd(CServer* server);
103 void ServerRemove(CServer* server);
104 void ServerRemoveDead();
105 void ServerRemoveAll();
106 void ServerHighlight(CServer* server, bool highlight);
107 void ServerRefresh(CServer* server);
108 void ServerFreeze();
109 void ServerThaw();
110 void ServerUpdateED2KInfo();
111 void ServerUpdateKadKInfo();
113 void SearchCancel();
114 void SearchLocalEnd();
115 void KadSearchEnd(uint32 id);
116 void Search_Update_Sources(CSearchFile* result);
117 void Search_Add_Result(CSearchFile* result);
119 void ChatUpdateFriend(CFriend* Friend);
120 void ChatRemoveFriend(CFriend* Friend);
121 void ChatConnResult(bool success, uint64 id, wxString message);
122 void ChatProcessMsg(uint64 sender, wxString message);
123 void ChatSendCaptcha(wxString captcha, uint64 to_id);
125 void ShowConnState(long state);
126 void ShowUserCount(wxString str);
127 void ShowUpdateCatTabTitles();
128 void ShowGUI();
130 void CategoryAdded();
131 void CategoryUpdate(uint32 cat);
132 void CategoryDelete(uint32 cat);
134 void NodesURLChanged(wxString url);
135 void ServersURLChanged(wxString url);
137 // Partfile conversion: Core -> GUI
138 void ConvertUpdateProgress(float percent, wxString label, wxString header);
139 void ConvertUpdateJobInfo(ConvertInfo info);
140 void ConvertRemoveJobInfo(unsigned id);
141 void ConvertClearInfos();
142 // Partfile conversion: GUI -> Core
143 void ConvertRemoveJob(unsigned id);
144 void ConvertRetryJob(unsigned id);
145 void ConvertReaddAllJobs();
148 // GUI -> core notification
151 void PartFile_Swap_A4AF(CPartFile* file);
152 void PartFile_Swap_A4AF_Auto(CPartFile* file);
153 void PartFile_Swap_A4AF_Others(CPartFile* file);
154 void PartFile_Pause(CPartFile* file);
155 void PartFile_Resume(CPartFile* file);
156 void PartFile_Stop(CPartFile* file);
157 void PartFile_PrioAuto(CPartFile* file, bool val);
158 void PartFile_PrioSet(CPartFile* file, uint8 newDownPriority, bool bSave);
159 void PartFile_Delete(CPartFile* file);
160 void PartFile_SetCat(CPartFile* file, uint32 val);
162 void KnownFile_Up_Prio_Set(CKnownFile* file, uint8 val);
163 void KnownFile_Up_Prio_Auto(CKnownFile* file);
164 void KnownFile_Comment_Set(CKnownFile* file, wxString comment, int8 rating);
166 void Search_Add_Download(CSearchFile* result, uint8 category);
167 void Search_Update_Progress(uint32 value);
169 void Download_Set_Cat_Prio(uint8 cat, uint8 newprio);
170 void Download_Set_Cat_Status(uint8 cat, int newstatus);
172 void Upload_Resort_Queue();
174 void Client_Delete(CClientRef client);
177 // Notifications that always create an event
179 void IPFilter_Reload();
180 void IPFilter_Update(wxString url);
182 ////////////////////////////////////////////////////////////
183 // Notification utilities
185 /**
186 * The base class of the functions.
188 * This class allows the the notification call to be executed
189 * without knowing the exact specifics of a given functor.
191 class CMuleNotiferBase
193 public:
194 /** The constructor does nothing. */
195 CMuleNotiferBase() {};
196 /** The destructor is virtual since we will be deleting pointers to this type. */
197 virtual ~CMuleNotiferBase() {};
199 /** Executes the actual notification call. */
200 virtual void Notify() const = 0;
201 /** Returns a copy of the functor (function + arguments). */
202 virtual CMuleNotiferBase* Clone() const = 0;
206 /** Notification functor for functions taking no arguments. */
207 class CMuleNotifier0 : public CMuleNotiferBase
209 public:
210 typedef void (*FuncType)();
212 /** Creates a functor from the given function. */
213 CMuleNotifier0(FuncType func)
214 : m_func(func) {}
216 /** @see CMuleNotifierBase::Notify */
217 virtual void Notify() const {
218 m_func();
221 /** @see CMuleNotifierBase::Clone */
222 virtual CMuleNotiferBase* Clone() const {
223 return new CMuleNotifier0(m_func);
226 private:
227 FuncType m_func;
231 /** Notification functor for functions taking 1 arguments. */
232 template <typename ARG>
233 class CMuleNotifier1 : public CMuleNotiferBase
235 public:
236 typedef void (*FuncType)(ARG);
238 /** Creates a functor from the given function and arguments. */
239 CMuleNotifier1(FuncType func, ARG arg)
240 : m_func(func),
241 m_arg(DeepCopy(arg))
244 /** @see CMuleNotifierBase::Notify */
245 virtual void Notify() const {
246 m_func(m_arg);
249 /** @see CMuleNotifierBase::Clone */
250 virtual CMuleNotiferBase* Clone() const {
251 return new CMuleNotifier1<ARG>(m_func, m_arg);
254 private:
255 FuncType m_func;
256 ARG m_arg;
260 /** Notification functor for functions taking 2 arguments. */
261 template <typename ARG_1, typename ARG_2>
262 class CMuleNotifier2 : public CMuleNotiferBase
264 public:
265 typedef void (*FuncType)(ARG_1, ARG_2);
267 /** Creates a functor from the given function and arguments. */
268 CMuleNotifier2(FuncType func, ARG_1 arg1, ARG_2 arg2)
269 : m_func(func),
270 m_arg1(DeepCopy(arg1)),
271 m_arg2(DeepCopy(arg2))
274 /** @see CMuleNotifierBase:: Notify */
275 virtual void Notify() const {
276 m_func(m_arg1, m_arg2);
279 /** @see CMuleNotifierBase::Clone */
280 virtual CMuleNotiferBase* Clone() const {
281 return new CMuleNotifier2<ARG_1, ARG_2>(m_func, m_arg1, m_arg2);
284 private:
285 FuncType m_func;
286 ARG_1 m_arg1;
287 ARG_2 m_arg2;
291 /** Notification functor for functions taking 3 arguments. */
292 template <typename ARG_1, typename ARG_2, typename ARG_3>
293 class CMuleNotifier3 : public CMuleNotiferBase
295 public:
296 typedef void (*FuncType)(ARG_1, ARG_2, ARG_3);
298 /** Creates a functor from the given function and arguments. */
299 CMuleNotifier3(FuncType func, ARG_1 arg1, ARG_2 arg2, ARG_3 arg3)
300 : m_func(func),
301 m_arg1(DeepCopy(arg1)),
302 m_arg2(DeepCopy(arg2)),
303 m_arg3(DeepCopy(arg3))
306 /** @see CMuleNotifierBase:: Notify */
307 virtual void Notify() const {
308 m_func(m_arg1, m_arg2, m_arg3);
311 /** @see CMuleNotifierBase::Clone */
312 virtual CMuleNotiferBase* Clone() const {
313 return new CMuleNotifier3<ARG_1, ARG_2, ARG_3>(m_func, m_arg1, m_arg2, m_arg3);
316 private:
317 FuncType m_func;
318 ARG_1 m_arg1;
319 ARG_2 m_arg2;
320 ARG_3 m_arg3;
324 /**
325 * This event is sent when a worker-thread makes use of a notify-macro.
327 * This insures that all notifications are executed on the main thread,
328 * thereby improving overall threadsafety. The events are currently
329 * sent to wxTheApp.
331 class CMuleGUIEvent : public wxEvent
333 public:
334 /** Takes ownership a notifier functor. */
335 CMuleGUIEvent(CMuleNotiferBase* ntf)
336 : wxEvent(-1, MULE_EVT_NOTIFY)
337 , m_functor(ntf)
339 wxASSERT(m_functor);
342 /** Destructor, frees the functor object. */
343 virtual ~CMuleGUIEvent() {
344 delete m_functor;
347 /** Executes the notification. */
348 void Notify() const {
349 m_functor->Notify();
352 /** @see wxEvent::Clone */
353 virtual wxEvent* Clone() const {
354 return new CMuleGUIEvent(m_functor->Clone());
357 private:
358 /** Not copyable. */
359 CMuleGUIEvent(const CMuleGUIEvent&);
360 /** Not assignable. */
361 CMuleGUIEvent& operator=(const CMuleGUIEvent&);
363 //! The actual functor object,
364 CMuleNotiferBase* m_functor;
369 * This function will execute or queue a given notification functor.
371 * If the caller is the main thread, the functor is executed immediatly,
372 * thus acting like a regular function call. OTOH, if the caller is a
373 * worker thread, the functor is cloned and sent via an event to
374 * wxTheApp.
376 void HandleNotification(const CMuleNotiferBase& ntf);
378 /**
379 * These functions take a function pointer and a set of arguments,
380 * matching those of the function-pointer. A functor is created
381 * from these and either executed immediatly, or sent as an event
382 * in the case of non-main threads calling the functions.
384 * Note that the return-value of the function must be void.
386 * IMPORTANT: Note that the functions passed to DoNotify must not
387 * take arguments via references, since this causes the functors
388 * to store references to the arguments, rather than a copy and
389 * thus ends up with dangling references.
391 //@{
392 inline void DoNotify(void (*func)()) {
393 HandleNotification(CMuleNotifier0(func));
395 template <typename A1A, typename A1B>
396 inline void DoNotify(void (*func)(A1A), A1B arg1) {
397 HandleNotification(CMuleNotifier1<A1A>(func, arg1));
399 template <typename A1A, typename A1B, typename A2A, typename A2B>
400 inline void DoNotify(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
401 HandleNotification(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
403 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
404 inline void DoNotify(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
405 HandleNotification(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
407 //@}
410 * The same as above, but these functions will always send an event,
411 * even from the main thread.
413 void HandleNotificationAlways(const CMuleNotiferBase& ntf);
415 inline void DoNotifyAlways(void (*func)()) {
416 HandleNotificationAlways(CMuleNotifier0(func));
418 template <typename A1A, typename A1B>
419 inline void DoNotifyAlways(void (*func)(A1A), A1B arg1) {
420 HandleNotificationAlways(CMuleNotifier1<A1A>(func, arg1));
422 template <typename A1A, typename A1B, typename A2A, typename A2B>
423 inline void DoNotifyAlways(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
424 HandleNotificationAlways(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
426 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
427 inline void DoNotifyAlways(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
428 HandleNotificationAlways(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
433 //! Placing CMuleGUIEvent in the global namespace.
434 using MuleNotify::CMuleGUIEvent;
436 //! The event-handler type that takes a CMuleGUIEvent.
437 typedef void (wxEvtHandler::*MuleNotifyEventFunction)(CMuleGUIEvent&);
439 //! Event-handler for completed hashings of new shared files and partfiles.
440 #define EVT_MULE_NOTIFY(func) \
441 DECLARE_EVENT_TABLE_ENTRY(MULE_EVT_NOTIFY, -1, -1, \
442 (wxObjectEventFunction) (wxEventFunction) \
443 wxStaticCastEvent(MuleNotifyEventFunction, &func), (wxObject*) NULL),
448 // SharedFilesCtrl
449 #define Notify_SharedFilesShowFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFile, file)
450 #define Notify_SharedFilesRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveFile, file)
451 #define Notify_SharedFilesRemoveAllItems() MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveAllFiles)
452 #define Notify_SharedFilesShowFileList() MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFileList)
453 #define Notify_SharedFilesSort() MuleNotify::DoNotify(&MuleNotify::SharedFilesSort)
454 #define Notify_SharedFilesUpdateItem(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesUpdateItem, file)
456 // download ctrl
457 #define Notify_DownloadCtrlUpdateItem(ptr) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlUpdateItem, ptr)
458 #define Notify_DownloadCtrlAddFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlAddFile, file)
459 #define Notify_DownloadCtrlRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlRemoveFile, file)
460 #define Notify_DownloadCtrlSort() MuleNotify::DoNotify(&MuleNotify::DownloadCtrlSort)
461 #define Notify_DownloadCtrlDoItemSelectionChanged() MuleNotify::DoNotifyAlways(&MuleNotify::DownloadCtrlDoItemSelectionChanged)
463 // source ctrl
464 #define Notify_SourceCtrlUpdateSource(ptr, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlUpdateSource, ptr, val)
465 #define Notify_SourceCtrlAddSource(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlAddSource, p0, p1, val)
466 #define Notify_SourceCtrlRemoveSource(ptr0, ptr1) MuleNotify::DoNotify(&MuleNotify::SourceCtrlRemoveSource, ptr0, ptr1)
468 // upload ctrl
469 #define Notify_SharedCtrlAddClient(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlAddClient, p0, p1, val)
470 #define Notify_SharedCtrlRefreshClient(ptr, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRefreshClient, ptr, val)
471 #define Notify_SharedCtrlRemoveClient(p0, p1) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRemoveClient, p0, p1)
473 // server
474 #define Notify_ServerAdd(ptr) MuleNotify::DoNotify(&MuleNotify::ServerAdd, ptr)
475 #define Notify_ServerRemove(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRemove, ptr)
476 #define Notify_ServerRemoveDead() MuleNotify::DoNotify(&MuleNotify::ServerRemoveDead)
477 #define Notify_ServerRemoveAll() MuleNotify::DoNotify(&MuleNotify::ServerRemoveAll)
478 #define Notify_ServerHighlight(ptr, val) MuleNotify::DoNotify(&MuleNotify::ServerHighlight, ptr, val)
479 #define Notify_ServerRefresh(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRefresh, ptr)
480 #define Notify_ServerFreeze() MuleNotify::DoNotify(&MuleNotify::ServerFreeze)
481 #define Notify_ServerThaw() MuleNotify::DoNotify(&MuleNotify::ServerThaw)
482 #define Notify_ServerUpdateED2KInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateED2KInfo)
483 #define Notify_ServerUpdateKadKInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateKadKInfo)
485 // search
486 #define Notify_SearchCancel() MuleNotify::DoNotify(&MuleNotify::SearchCancel)
487 #define Notify_SearchLocalEnd() MuleNotify::DoNotify(&MuleNotify::SearchLocalEnd)
488 #define Notify_KadSearchEnd(val) MuleNotify::DoNotify(&MuleNotify::KadSearchEnd, val)
489 #define Notify_Search_Update_Sources(ptr) MuleNotify::DoNotify(&MuleNotify::Search_Update_Sources, ptr)
490 #define Notify_Search_Add_Result(s) MuleNotify::DoNotify(&MuleNotify::Search_Add_Result, s)
492 // chat
493 #define Notify_ChatUpdateFriend(ptr) MuleNotify::DoNotify(&MuleNotify::ChatUpdateFriend, ptr)
494 #define Notify_ChatRemoveFriend(ptr) MuleNotify::DoNotify(&MuleNotify::ChatRemoveFriend, ptr)
495 #define Notify_ChatConnResult(val0, val1, s) MuleNotify::DoNotify(&MuleNotify::ChatConnResult, val0, val1, s)
496 #define Notify_ChatProcessMsg(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatProcessMsg, val0, s)
497 #define Notify_ChatSendCaptcha(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatSendCaptcha, val0, s)
499 // misc
500 #define Notify_ShowConnState(val) MuleNotify::DoNotify(&MuleNotify::ShowConnState, val)
501 #define Notify_ShowUserCount(str) MuleNotify::DoNotify(&MuleNotify::ShowUserCount, str)
502 #define Notify_ShowUpdateCatTabTitles() MuleNotify::DoNotify(&MuleNotify::ShowUpdateCatTabTitles)
503 #define Notify_ShowGUI() MuleNotify::DoNotify(&MuleNotify::ShowGUI)
505 // categories
506 #define Notify_CategoryAdded() MuleNotify::DoNotify(&MuleNotify::CategoryAdded)
507 #define Notify_CategoryUpdate(cat) MuleNotify::DoNotify(&MuleNotify::CategoryUpdate, cat)
508 #define Notify_CategoryDelete(cat) MuleNotify::DoNotify(&MuleNotify::CategoryDelete, cat)
510 // server.met/nodes.dat default urls
511 #define Notify_NodesURLChanged(url) MuleNotify::DoNotify(&MuleNotify::NodesURLChanged, url)
512 #define Notify_ServersURLChanged(url) MuleNotify::DoNotify(&MuleNotify::ServersURLChanged, url)
514 // Partfile conversion: Core -> GUI
515 #define Notify_ConvertUpdateProgress(val, text) Notify_ConvertUpdateProgressFull(val, text, wxEmptyString)
516 #define Notify_ConvertUpdateProgressFull(val, text, hdr) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateProgress, val, text, hdr)
517 #define Notify_ConvertUpdateJobInfo(info) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateJobInfo, info)
518 #define Notify_ConvertRemoveJobInfo(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJobInfo, id)
519 #define Notify_ConvertClearInfos() MuleNotify::DoNotify(&MuleNotify::ConvertClearInfos)
520 // Partfile conversion: GUI -> Core
521 #define Notify_ConvertRemoveJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJob, id)
522 #define Notify_ConvertRetryJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRetryJob, id)
523 #define Notify_ConvertReaddAllJobs() MuleNotify::DoNotify(&MuleNotify::ConvertReaddAllJobs)
526 // GUI -> core notification
529 // PartFile
530 #define CoreNotify_PartFile_Swap_A4AF(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF, ptr)
531 #define CoreNotify_PartFile_Swap_A4AF_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Auto, ptr)
532 #define CoreNotify_PartFile_Swap_A4AF_Others(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Others, ptr)
533 #define CoreNotify_PartFile_Pause(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Pause, ptr)
534 #define CoreNotify_PartFile_Resume(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Resume, ptr)
535 #define CoreNotify_PartFile_Stop(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Stop, ptr)
536 #define CoreNotify_PartFile_PrioAuto(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioAuto, ptr, val)
537 #define CoreNotify_PartFile_PrioSet(p, v0, v1) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioSet, p, v0, v1)
538 #define CoreNotify_PartFile_Delete(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Delete, ptr)
539 #define CoreNotify_PartFile_SetCat(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_SetCat, ptr, val)
541 // KnownFile
542 #define CoreNotify_KnownFile_Up_Prio_Set(ptr, val) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Set, ptr, val)
543 #define CoreNotify_KnownFile_Up_Prio_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Auto, ptr)
544 #define CoreNotify_KnownFile_Comment_Set(ptr, v0, v1) MuleNotify::DoNotify(&MuleNotify::KnownFile_Comment_Set, ptr, v0, v1)
546 // Search
547 #define CoreNotify_Search_Add_Download(ptr, val) MuleNotify::DoNotify(&MuleNotify::Search_Add_Download, ptr, val)
548 #define CoreNotify_Search_Update_Progress(val) MuleNotify::DoNotify(&MuleNotify::Search_Update_Progress, val)
550 // download queue
551 #define CoreNotify_Download_Set_Cat_Prio(cat, pri) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Prio, cat, pri)
552 #define CoreNotify_Download_Set_Cat_Status(cat, st) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Status, cat, st)
554 // upload queue
555 #define CoreNotify_Upload_Resort_Queue() MuleNotify::DoNotify(&MuleNotify::Upload_Resort_Queue)
557 // client
558 #define CoreNotify_Client_Delete(client) MuleNotify::DoNotify(&MuleNotify::Client_Delete, client)
561 // Notifications that always create an event
564 // IP filter
565 #define NotifyAlways_IPFilter_Reload() MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Reload)
566 #define NotifyAlways_IPFilter_Update(url) MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Update, url)
568 #endif // __GUIEVENTS_H__
570 // File_checked_for_headers