Fix crash with wxWidgets 2.9
[amule.git] / src / GuiEvents.h
blob0a96313318650c0ab4dd70d9e4c4ca715de05486
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2004-2008 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Copyright (c) 2004-2008 Angel Vidal ( kry@amule.org )
6 // Copyright (c) 2004-2008 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;
44 DECLARE_LOCAL_EVENT_TYPE(MULE_EVT_NOTIFY, -1)
47 /**
48 * This namespaces contains a number of functions and classes
49 * related to defered function calls, allowing a notification
50 * call to be delayed till it can be initiated from the main
51 * thread.
53 namespace MuleNotify
55 /**
56 * Creates a deep copy of the object passed.
58 * Note that this function should be overwritten as
59 * needed. See the wxString version below.
61 template <class ValueType>
62 inline ValueType DeepCopy(const ValueType& value)
64 return ValueType(value);
67 /** Special DeepCopy for wxString, which uses reference counting. */
68 inline wxString DeepCopy(const wxString& value)
70 return wxString(value.c_str(), value.Length());
74 ////////////////////////////////////////////////////////////
75 // Notification handlers
77 // These functions should not be called directly, but
78 // through the Notify_*, etc. macros.
81 void SharedFilesShowFile(CKnownFile* file);
82 void SharedFilesRemoveFile(CKnownFile* file);
83 void SharedFilesRemoveAllFiles();
84 void SharedFilesShowFileList();
85 void SharedFilesUpdateItem(CKnownFile* file);
87 void DownloadCtrlUpdateItem(const void* item);
88 void SourceCtrlUpdateSource(CUpDownClient* source, SourceItemType type);
89 void DownloadCtrlAddFile(CPartFile* file);
90 void SourceCtrlAddSource(CPartFile* owner, CUpDownClient* source, SourceItemType type);
91 void DownloadCtrlRemoveFile(CPartFile* file);
92 void SourceCtrlRemoveSource(const CUpDownClient* source, const CPartFile* owner);
93 void DownloadCtrlHideSource(CPartFile* file);
94 void DownloadCtrlSort();
96 void SharedCtrlAddClient(CKnownFile* owner, CUpDownClient* client, SourceItemType type);
97 void SharedCtrlRefreshClient(CUpDownClient* client, SourceItemType type);
98 void SharedCtrlRemoveClient(const CKnownFile* owner, const CUpDownClient* client);
100 void ServerAdd(CServer* server);
101 void ServerRemove(CServer* server);
102 void ServerRemoveDead();
103 void ServerRemoveAll();
104 void ServerHighlight(CServer* server, bool highlight);
105 void ServerRefresh(CServer* server);
106 void ServerFreeze();
107 void ServerThaw();
108 void ServerUpdateED2KInfo();
109 void ServerUpdateKadKInfo();
111 void SearchCancel();
112 void SearchLocalEnd();
113 void KadSearchEnd(uint32 id);
114 void Search_Update_Sources(CSearchFile* result);
115 void Search_Add_Result(CSearchFile* result);
117 void ChatRefreshFriend(CFriend* Friend, bool connected);
118 void ChatConnResult(bool success, uint64 id, wxString message);
119 void ChatProcessMsg(uint64 sender, wxString message);
120 void ChatSendCaptcha(wxString captcha, uint64 to_id);
122 void ShowConnState(long state);
123 void ShowUserCount(wxString str);
124 void ShowQueueCount(uint32 count);
125 void ShowUpdateCatTabTitles();
126 void ShowGUI();
128 void CategoryAdded();
129 void CategoryUpdate(uint32 cat);
130 void CategoryDelete(uint32 cat);
132 void NodesURLChanged(wxString url);
133 void ServersURLChanged(wxString url);
135 // Partfile conversion: Core -> GUI
136 void ConvertUpdateProgress(float percent, wxString label, wxString header);
137 void ConvertUpdateJobInfo(ConvertInfo info);
138 void ConvertRemoveJobInfo(unsigned id);
139 void ConvertClearInfos();
140 // Partfile conversion: GUI -> Core
141 void ConvertRemoveJob(unsigned id);
142 void ConvertRetryJob(unsigned id);
143 void ConvertReaddAllJobs();
146 // GUI -> core notification
149 void PartFile_Swap_A4AF(CPartFile* file);
150 void PartFile_Swap_A4AF_Auto(CPartFile* file);
151 void PartFile_Swap_A4AF_Others(CPartFile* file);
152 void PartFile_Pause(CPartFile* file);
153 void PartFile_Resume(CPartFile* file);
154 void PartFile_Stop(CPartFile* file);
155 void PartFile_PrioAuto(CPartFile* file, bool val);
156 void PartFile_PrioSet(CPartFile* file, uint8 newDownPriority, bool bSave);
157 void PartFile_Delete(CPartFile* file);
158 void PartFile_SetCat(CPartFile* file, uint32 val);
160 void KnownFile_Up_Prio_Set(CKnownFile* file, uint8 val);
161 void KnownFile_Up_Prio_Auto(CKnownFile* file);
162 void KnownFile_Comment_Set(CKnownFile* file, wxString comment);
164 void Search_Add_Download(CSearchFile* result, uint8 category);
165 void Search_Update_Progress(uint32 value);
167 void Download_Set_Cat_Prio(uint8 cat, uint8 newprio);
168 void Download_Set_Cat_Status(uint8 cat, int newstatus);
171 // Notifications that always create an event
173 void IPFilter_Reload();
174 void IPFilter_Update(wxString url);
176 ////////////////////////////////////////////////////////////
177 // Notification utilities
179 /**
180 * The base class of the functions.
182 * This class allows the the notification call to be executed
183 * without knowing the exact specifics of a given functor.
185 class CMuleNotiferBase
187 public:
188 /** The constructor does nothing. */
189 CMuleNotiferBase() {};
190 /** The destructor is virtual since we will be deleting pointers to this type. */
191 virtual ~CMuleNotiferBase() {};
193 /** Executes the actual notification call. */
194 virtual void Notify() const = 0;
195 /** Returns a copy of the functor (function + arguments). */
196 virtual CMuleNotiferBase* Clone() const = 0;
200 /** Notification functor for functions taking no arguments. */
201 class CMuleNotifier0 : public CMuleNotiferBase
203 public:
204 typedef void (*FuncType)();
206 /** Creates a functor from the given function. */
207 CMuleNotifier0(FuncType func)
208 : m_func(func) {}
210 /** @see CMuleNotifierBase::Notify */
211 virtual void Notify() const {
212 m_func();
215 /** @see CMuleNotifierBase::Clone */
216 virtual CMuleNotiferBase* Clone() const {
217 return new CMuleNotifier0(m_func);
220 private:
221 FuncType m_func;
225 /** Notification functor for functions taking 1 arguments. */
226 template <typename ARG>
227 class CMuleNotifier1 : public CMuleNotiferBase
229 public:
230 typedef void (*FuncType)(ARG);
232 /** Creates a functor from the given function and arguments. */
233 CMuleNotifier1(FuncType func, ARG arg)
234 : m_func(func),
235 m_arg(DeepCopy(arg))
238 /** @see CMuleNotifierBase::Notify */
239 virtual void Notify() const {
240 m_func(m_arg);
243 /** @see CMuleNotifierBase::Clone */
244 virtual CMuleNotiferBase* Clone() const {
245 return new CMuleNotifier1<ARG>(m_func, m_arg);
248 private:
249 FuncType m_func;
250 ARG m_arg;
254 /** Notification functor for functions taking 2 arguments. */
255 template <typename ARG_1, typename ARG_2>
256 class CMuleNotifier2 : public CMuleNotiferBase
258 public:
259 typedef void (*FuncType)(ARG_1, ARG_2);
261 /** Creates a functor from the given function and arguments. */
262 CMuleNotifier2(FuncType func, ARG_1 arg1, ARG_2 arg2)
263 : m_func(func),
264 m_arg1(DeepCopy(arg1)),
265 m_arg2(DeepCopy(arg2))
268 /** @see CMuleNotifierBase:: Notify */
269 virtual void Notify() const {
270 m_func(m_arg1, m_arg2);
273 /** @see CMuleNotifierBase::Clone */
274 virtual CMuleNotiferBase* Clone() const {
275 return new CMuleNotifier2<ARG_1, ARG_2>(m_func, m_arg1, m_arg2);
278 private:
279 FuncType m_func;
280 ARG_1 m_arg1;
281 ARG_2 m_arg2;
285 /** Notification functor for functions taking 3 arguments. */
286 template <typename ARG_1, typename ARG_2, typename ARG_3>
287 class CMuleNotifier3 : public CMuleNotiferBase
289 public:
290 typedef void (*FuncType)(ARG_1, ARG_2, ARG_3);
292 /** Creates a functor from the given function and arguments. */
293 CMuleNotifier3(FuncType func, ARG_1 arg1, ARG_2 arg2, ARG_3 arg3)
294 : m_func(func),
295 m_arg1(DeepCopy(arg1)),
296 m_arg2(DeepCopy(arg2)),
297 m_arg3(DeepCopy(arg3))
300 /** @see CMuleNotifierBase:: Notify */
301 virtual void Notify() const {
302 m_func(m_arg1, m_arg2, m_arg3);
305 /** @see CMuleNotifierBase::Clone */
306 virtual CMuleNotiferBase* Clone() const {
307 return new CMuleNotifier3<ARG_1, ARG_2, ARG_3>(m_func, m_arg1, m_arg2, m_arg3);
310 private:
311 FuncType m_func;
312 ARG_1 m_arg1;
313 ARG_2 m_arg2;
314 ARG_3 m_arg3;
318 /**
319 * This event is sent when a worker-thread makes use of a notify-macro.
321 * This insures that all notifications are executed on the main thread,
322 * thereby improving overall threadsafety. The events are currently
323 * sent to wxTheApp.
325 class CMuleGUIEvent : public wxEvent
327 public:
328 /** Takes ownership a notifier functor. */
329 CMuleGUIEvent(CMuleNotiferBase* ntf)
330 : wxEvent(-1, MULE_EVT_NOTIFY)
331 , m_functor(ntf)
333 wxASSERT(m_functor);
336 /** Destructor, frees the functor object. */
337 virtual ~CMuleGUIEvent() {
338 delete m_functor;
341 /** Executes the notification. */
342 void Notify() const {
343 m_functor->Notify();
346 /** @see wxEvent::Clone */
347 virtual wxEvent* Clone() const {
348 return new CMuleGUIEvent(m_functor->Clone());
351 private:
352 /** Not copyable. */
353 CMuleGUIEvent(const CMuleGUIEvent&);
354 /** Not assignable. */
355 CMuleGUIEvent& operator=(const CMuleGUIEvent&);
357 //! The actual functor object,
358 CMuleNotiferBase* m_functor;
363 * This function will execute or queue a given notification functor.
365 * If the caller is the main thread, the functor is executed immediatly,
366 * thus acting like a regular function call. OTOH, if the caller is a
367 * worker thread, the functor is cloned and sent via an event to
368 * wxTheApp.
370 void HandleNotification(const CMuleNotiferBase& ntf);
372 /**
373 * These functions take a function pointer and a set of arguments,
374 * matching those of the function-pointer. A functor is created
375 * from these and either executed immediatly, or sent as an event
376 * in the case of non-main threads calling the functions.
378 * Note that the return-value of the function must be void.
380 * IMPORTANT: Note that the functions passed to DoNotify must not
381 * take arguments via references, since this causes the functors
382 * to store references to the arguments, rather than a copy and
383 * thus ends up with dangling references.
385 //@{
386 inline void DoNotify(void (*func)()) {
387 HandleNotification(CMuleNotifier0(func));
389 template <typename A1A, typename A1B>
390 inline void DoNotify(void (*func)(A1A), A1B arg1) {
391 HandleNotification(CMuleNotifier1<A1A>(func, arg1));
393 template <typename A1A, typename A1B, typename A2A, typename A2B>
394 inline void DoNotify(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
395 HandleNotification(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
397 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
398 inline void DoNotify(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
399 HandleNotification(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
401 //@}
404 * The same as above, but these functions will always send an event,
405 * even from the main thread.
407 void HandleNotificationAlways(const CMuleNotiferBase& ntf);
409 inline void DoNotifyAlways(void (*func)()) {
410 HandleNotificationAlways(CMuleNotifier0(func));
412 template <typename A1A, typename A1B>
413 inline void DoNotifyAlways(void (*func)(A1A), A1B arg1) {
414 HandleNotificationAlways(CMuleNotifier1<A1A>(func, arg1));
416 template <typename A1A, typename A1B, typename A2A, typename A2B>
417 inline void DoNotifyAlways(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
418 HandleNotificationAlways(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
420 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
421 inline void DoNotifyAlways(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
422 HandleNotificationAlways(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
427 //! Placing CMuleGUIEvent in the global namespace.
428 using MuleNotify::CMuleGUIEvent;
430 //! The event-handler type that takes a CMuleGUIEvent.
431 typedef void (wxEvtHandler::*MuleNotifyEventFunction)(CMuleGUIEvent&);
433 //! Event-handler for completed hashings of new shared files and partfiles.
434 #define EVT_MULE_NOTIFY(func) \
435 DECLARE_EVENT_TABLE_ENTRY(MULE_EVT_NOTIFY, -1, -1, \
436 (wxObjectEventFunction) (wxEventFunction) \
437 wxStaticCastEvent(MuleNotifyEventFunction, &func), (wxObject*) NULL),
442 // SharedFilesCtrl
443 #define Notify_SharedFilesShowFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFile, file)
444 #define Notify_SharedFilesRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveFile, file)
445 #define Notify_SharedFilesRemoveAllItems() MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveAllFiles)
446 #define Notify_SharedFilesShowFileList() MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFileList)
447 #define Notify_SharedFilesSort() MuleNotify::DoNotify(&MuleNotify::SharedFilesSort)
448 #define Notify_SharedFilesUpdateItem(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesUpdateItem, file)
450 // download ctrl
451 #define Notify_DownloadCtrlUpdateItem(ptr) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlUpdateItem, ptr)
452 #define Notify_DownloadCtrlAddFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlAddFile, file)
453 #define Notify_DownloadCtrlRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlRemoveFile, file)
454 #define Notify_DownloadCtrlSort() MuleNotify::DoNotify(&MuleNotify::DownloadCtrlSort)
456 // source ctrl
457 #define Notify_SourceCtrlUpdateSource(ptr, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlUpdateSource, ptr, val)
458 #define Notify_SourceCtrlAddSource(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlAddSource, p0, p1, val)
459 #define Notify_SourceCtrlRemoveSource(ptr0, ptr1) MuleNotify::DoNotify(&MuleNotify::SourceCtrlRemoveSource, ptr0, ptr1)
461 // upload ctrl
462 #define Notify_SharedCtrlAddClient(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlAddClient, p0, p1, val)
463 #define Notify_SharedCtrlRefreshClient(ptr, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRefreshClient, ptr, val)
464 #define Notify_SharedCtrlRemoveClient(p0, p1) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRemoveClient, p0, p1)
466 // server
467 #define Notify_ServerAdd(ptr) MuleNotify::DoNotify(&MuleNotify::ServerAdd, ptr)
468 #define Notify_ServerRemove(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRemove, ptr)
469 #define Notify_ServerRemoveDead() MuleNotify::DoNotify(&MuleNotify::ServerRemoveDead)
470 #define Notify_ServerRemoveAll() MuleNotify::DoNotify(&MuleNotify::ServerRemoveAll)
471 #define Notify_ServerHighlight(ptr, val) MuleNotify::DoNotify(&MuleNotify::ServerHighlight, ptr, val)
472 #define Notify_ServerRefresh(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRefresh, ptr)
473 #define Notify_ServerFreeze() MuleNotify::DoNotify(&MuleNotify::ServerFreeze)
474 #define Notify_ServerThaw() MuleNotify::DoNotify(&MuleNotify::ServerThaw)
475 #define Notify_ServerUpdateED2KInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateED2KInfo)
476 #define Notify_ServerUpdateKadKInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateKadKInfo)
478 // search
479 #define Notify_SearchCancel() MuleNotify::DoNotify(&MuleNotify::SearchCancel)
480 #define Notify_SearchLocalEnd() MuleNotify::DoNotify(&MuleNotify::SearchLocalEnd)
481 #define Notify_KadSearchEnd(val) MuleNotify::DoNotify(&MuleNotify::KadSearchEnd, val)
482 #define Notify_Search_Update_Sources(ptr) MuleNotify::DoNotify(&MuleNotify::Search_Update_Sources, ptr)
483 #define Notify_Search_Add_Result(s) MuleNotify::DoNotify(&MuleNotify::Search_Add_Result, s)
485 // chat
486 #define Notify_ChatRefreshFriend(ptr, val) MuleNotify::DoNotify(&MuleNotify::ChatRefreshFriend, ptr, val)
487 #define Notify_ChatConnResult(val0, val1, s) MuleNotify::DoNotify(&MuleNotify::ChatConnResult, val0, val1, s)
488 #define Notify_ChatProcessMsg(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatProcessMsg, val0, s)
489 #define Notify_ChatSendCaptcha(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatSendCaptcha, val0, s)
491 // misc
492 #define Notify_ShowConnState(val) MuleNotify::DoNotify(&MuleNotify::ShowConnState, val)
493 #define Notify_ShowUserCount(str) MuleNotify::DoNotify(&MuleNotify::ShowUserCount, str)
494 #define Notify_ShowQueueCount(val) MuleNotify::DoNotify(&MuleNotify::ShowQueueCount, val)
495 #define Notify_ShowUpdateCatTabTitles() MuleNotify::DoNotify(&MuleNotify::ShowUpdateCatTabTitles)
496 #define Notify_ShowGUI() MuleNotify::DoNotify(&MuleNotify::ShowGUI)
498 // categories
499 #define Notify_CategoryAdded() MuleNotify::DoNotify(&MuleNotify::CategoryAdded)
500 #define Notify_CategoryUpdate(cat) MuleNotify::DoNotify(&MuleNotify::CategoryUpdate, cat)
501 #define Notify_CategoryDelete(cat) MuleNotify::DoNotify(&MuleNotify::CategoryDelete, cat)
503 // server.met/nodes.dat default urls
504 #define Notify_NodesURLChanged(url) MuleNotify::DoNotify(&MuleNotify::NodesURLChanged, url)
505 #define Notify_ServersURLChanged(url) MuleNotify::DoNotify(&MuleNotify::ServersURLChanged, url)
507 // Partfile conversion: Core -> GUI
508 #define Notify_ConvertUpdateProgress(val, text) Notify_ConvertUpdateProgressFull(val, text, wxEmptyString)
509 #define Notify_ConvertUpdateProgressFull(val, text, hdr) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateProgress, val, text, hdr)
510 #define Notify_ConvertUpdateJobInfo(info) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateJobInfo, info)
511 #define Notify_ConvertRemoveJobInfo(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJobInfo, id)
512 #define Notify_ConvertClearInfos() MuleNotify::DoNotify(&MuleNotify::ConvertClearInfos)
513 // Partfile conversion: GUI -> Core
514 #define Notify_ConvertRemoveJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJob, id)
515 #define Notify_ConvertRetryJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRetryJob, id)
516 #define Notify_ConvertReaddAllJobs() MuleNotify::DoNotify(&MuleNotify::ConvertReaddAllJobs)
519 // GUI -> core notification
522 // PartFile
523 #define CoreNotify_PartFile_Swap_A4AF(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF, ptr)
524 #define CoreNotify_PartFile_Swap_A4AF_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Auto, ptr)
525 #define CoreNotify_PartFile_Swap_A4AF_Others(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Others, ptr)
526 #define CoreNotify_PartFile_Pause(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Pause, ptr)
527 #define CoreNotify_PartFile_Resume(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Resume, ptr)
528 #define CoreNotify_PartFile_Stop(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Stop, ptr)
529 #define CoreNotify_PartFile_PrioAuto(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioAuto, ptr, val)
530 #define CoreNotify_PartFile_PrioSet(p, v0, v1) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioSet, p, v0, v1)
531 #define CoreNotify_PartFile_Delete(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Delete, ptr)
532 #define CoreNotify_PartFile_SetCat(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_SetCat, ptr, val)
534 // KnownFile
535 #define CoreNotify_KnownFile_Up_Prio_Set(ptr, val) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Set, ptr, val)
536 #define CoreNotify_KnownFile_Up_Prio_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Auto, ptr)
537 #define CoreNotify_KnownFile_Comment_Set(ptr, val) MuleNotify::DoNotify(&MuleNotify::KnownFile_Comment_Set, ptr, val)
539 // Search
540 #define CoreNotify_Search_Add_Download(ptr, val) MuleNotify::DoNotify(&MuleNotify::Search_Add_Download, ptr, val)
541 #define CoreNotify_Search_Update_Progress(val) MuleNotify::DoNotify(&MuleNotify::Search_Update_Progress, val)
543 // download queue
544 #define CoreNotify_Download_Set_Cat_Prio(cat, pri) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Prio, cat, pri)
545 #define CoreNotify_Download_Set_Cat_Status(cat, st) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Status, cat, st)
548 // Notifications that always create an event
551 // IP filter
552 #define NotifyAlways_IPFilter_Reload() MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Reload)
553 #define NotifyAlways_IPFilter_Update(url) MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Update, url)
555 #endif // __GUIEVENTS_H__
557 // File_checked_for_headers