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 
50 /** Maximum length of the plugin name field. */
51 #define PLUGIN_MSG_NAME_LENGTH 32
52 
53 /** Load plugin message.
54  * Message type Id is MSG_PLUGIN_LOAD.
55  */
56 typedef struct {
57  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin to load. */
59 
60 /** Unload plugin message.
61  * Message type Id is MSG_PLUGIN_UNLOAD.
62  */
63 typedef struct {
64  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of te plugin to unload. */
66 
67 /** Plugin loaded message.
68  * Message type ID is MSG_PLUGIN_LOADED.
69  */
70 typedef struct {
71  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin that has been loaded */
73 
74 /** Plugin load failed. */
75 typedef struct {
76  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of plugin that could not be unloaded */
78 
79 /** Plugin unload failed. */
80 typedef struct {
81  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of plugin that could not be unloaded */
83 
84 /** Plugin unloaded message.
85  * Message type ID is MSG_PLUGIN_UNLOADED.
86  */
87 typedef struct {
88  char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin that has been unloaded */
90 
91 /** Plugin list message.
92  * Message type ID is MSG_PLUGIN_LIST.
93  */
94 typedef struct {
95  dynamic_list_t plugin_list; /**< dynamically growing list of plugin names. */
97 
98 
99 } // end namespace fawkes
100 
101 #endif
request list of available plugins
Definition: messages.h:39
plugin unloaded (plugin_unloaded_msg_t)
Definition: messages.h:37
Plugin loaded message.
Definition: messages.h:70
listing available plugins failed
Definition: messages.h:41
Unsubscribe from watching load/unload events.
Definition: messages.h:46
Fawkes library namespace.
Plugin unloaded message.
Definition: messages.h:87
dynamic_list_t plugin_list
dynamically growing list of plugin names.
Definition: messages.h:95
Dynamic list type.
Plugin list message.
Definition: messages.h:94
list of loaded plugins (plugin_list_msg_t)
Definition: messages.h:43
plugin unload failed (plugin_unload_failed_msg_t)
Definition: messages.h:38
Plugin unload failed.
Definition: messages.h:80
plugin loaded (plugin_loaded_msg_t)
Definition: messages.h:34
request plugin unload (plugin_unload_msg_t)
Definition: messages.h:36
list of available plugins (plugin_list_msg_t)
Definition: messages.h:40
plugin_message_type_t
Plugin message type.
Definition: messages.h:32
listing loaded plugins failed
Definition: messages.h:44
Load plugin message.
Definition: messages.h:56
request lif of loaded plugins
Definition: messages.h:42
request plugin load (plugin_load_msg_t)
Definition: messages.h:33
Plugin load failed.
Definition: messages.h:75
Subscribe for watching load/unload events.
Definition: messages.h:45
plugin load failed (plugin_load_failed_msg_t)
Definition: messages.h:35
Unload plugin message.
Definition: messages.h:63