Fawkes API  Fawkes Development Version
messages.h
1 
2 /***************************************************************************
3  * plugin_messages.h - Fawkes Plugin Messages
4  *
5  * Created: Wed Nov 22 17:24:16 2006
6  * Copyright 2006 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _PLUGIN_NET_MESSAGES_H_
25 #define _PLUGIN_NET_MESSAGES_H_
26 
27 #include <netcomm/utils/dynamic_buffer.h>
28 
29 namespace fawkes {
30 
31 /** Plugin message type. */
32 typedef enum {
33  MSG_PLUGIN_LOAD = 1, /**< request plugin load (plugin_load_msg_t) */
34  MSG_PLUGIN_LOADED = 2, /**< plugin loaded (plugin_loaded_msg_t) */
35  MSG_PLUGIN_LOAD_FAILED = 3, /**< plugin load failed (plugin_load_failed_msg_t) */
36  MSG_PLUGIN_UNLOAD = 4, /**< request plugin unload (plugin_unload_msg_t) */
37  MSG_PLUGIN_UNLOADED = 5, /**< plugin unloaded (plugin_unloaded_msg_t) */
38  MSG_PLUGIN_UNLOAD_FAILED = 6, /**< plugin unload failed (plugin_unload_failed_msg_t) */
39  MSG_PLUGIN_LIST_AVAIL = 7, /**< request list of available plugins */
40  MSG_PLUGIN_AVAIL_LIST = 8, /**< list of available plugins (plugin_list_msg_t) */
41  MSG_PLUGIN_AVAIL_LIST_FAILED = 9, /**< listing available plugins failed */
42  MSG_PLUGIN_LIST_LOADED = 10, /**< request lif of loaded plugins */
43  MSG_PLUGIN_LOADED_LIST = 11, /**< list of loaded plugins (plugin_list_msg_t) */
44  MSG_PLUGIN_LOADED_LIST_FAILED = 12, /**< listing loaded plugins failed */
45  MSG_PLUGIN_SUBSCRIBE_WATCH = 13, /**< Subscribe for watching load/unload events */
46  MSG_PLUGIN_UNSUBSCRIBE_WATCH = 14 /**< Unsubscribe from watching load/unload events */
48 
49 /** Maximum length of the plugin name field. */
50 #define PLUGIN_MSG_NAME_LENGTH 32
51 
52 /** Load plugin message.
53  * Message type Id is MSG_PLUGIN_LOAD.
54  */
55 typedef struct
56 {
57  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin to load. */
58 } plugin_load_msg_t;
59 
60 /** Unload plugin message.
61  * Message type Id is MSG_PLUGIN_UNLOAD.
62  */
63 typedef struct
64 {
65  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of te plugin to unload. */
67 
68 /** Plugin loaded message.
69  * Message type ID is MSG_PLUGIN_LOADED.
70  */
71 typedef struct
72 {
73  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin that has been loaded */
75 
76 /** Plugin load failed. */
77 typedef struct
78 {
79  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of plugin that could not be unloaded */
81 
82 /** Plugin unload failed. */
83 typedef struct
84 {
85  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of plugin that could not be unloaded */
87 
88 /** Plugin unloaded message.
89  * Message type ID is MSG_PLUGIN_UNLOADED.
90  */
91 typedef struct
92 {
93  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin that has been unloaded */
95 
96 /** Plugin list message.
97  * Message type ID is MSG_PLUGIN_LIST.
98  */
99 typedef struct
100 {
101  dynamic_list_t plugin_list; /**< dynamically growing list of plugin names. */
103 
104 } // end namespace fawkes
105 
106 #endif
fawkes::plugin_unloaded_msg_t
Plugin unloaded message.
Definition: messages.h:95
fawkes::MSG_PLUGIN_UNLOAD_FAILED
plugin unload failed (plugin_unload_failed_msg_t)
Definition: messages.h:47
fawkes::plugin_unload_failed_msg_t
Plugin unload failed.
Definition: messages.h:87
fawkes::MSG_PLUGIN_LOADED_LIST
list of loaded plugins (plugin_list_msg_t)
Definition: messages.h:52
fawkes::plugin_loaded_msg_t
Plugin loaded message.
Definition: messages.h:75
fawkes::MSG_PLUGIN_LIST_AVAIL
request list of available plugins
Definition: messages.h:48
fawkes::MSG_PLUGIN_UNLOAD
request plugin unload (plugin_unload_msg_t)
Definition: messages.h:45
fawkes::MSG_PLUGIN_UNSUBSCRIBE_WATCH
Unsubscribe from watching load/unload events.
Definition: messages.h:55
fawkes::MSG_PLUGIN_AVAIL_LIST_FAILED
listing available plugins failed
Definition: messages.h:50
fawkes::MSG_PLUGIN_LOADED
plugin loaded (plugin_loaded_msg_t)
Definition: messages.h:43
fawkes::MSG_PLUGIN_AVAIL_LIST
list of available plugins (plugin_list_msg_t)
Definition: messages.h:49
fawkes::MSG_PLUGIN_LIST_LOADED
request lif of loaded plugins
Definition: messages.h:51
fawkes
fawkes::dynamic_list_t
Dynamic list type.
Definition: dynamic_buffer.h:45
fawkes::MSG_PLUGIN_LOAD_FAILED
plugin load failed (plugin_load_failed_msg_t)
Definition: messages.h:44
fawkes::MSG_PLUGIN_LOAD
request plugin load (plugin_load_msg_t)
Definition: messages.h:42
fawkes::plugin_unload_msg_t
Unload plugin message.
Definition: messages.h:67
fawkes::plugin_load_failed_msg_t
Plugin load failed.
Definition: messages.h:81
fawkes::MSG_PLUGIN_LOADED_LIST_FAILED
listing loaded plugins failed
Definition: messages.h:53
fawkes::MSG_PLUGIN_UNLOADED
plugin unloaded (plugin_unloaded_msg_t)
Definition: messages.h:46
fawkes::plugin_message_type_t
plugin_message_type_t
Plugin message type.
Definition: messages.h:36
fawkes::MSG_PLUGIN_SUBSCRIBE_WATCH
Subscribe for watching load/unload events.
Definition: messages.h:54
fawkes::plugin_list_msg_t
Plugin list message.
Definition: messages.h:103