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
29namespace fawkes {
30
31/** Plugin message type. */
32typedef 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 */
55typedef struct
56{
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 */
63typedef 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 */
71typedef struct
72{
73 char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of the plugin that has been loaded */
75
76/** Plugin load failed. */
77typedef struct
78{
79 char name[PLUGIN_MSG_NAME_LENGTH]; /**< name of plugin that could not be unloaded */
81
82/** Plugin unload failed. */
83typedef 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 */
91typedef 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 */
99typedef struct
100{
101 dynamic_list_t plugin_list; /**< dynamically growing list of plugin names. */
103
104} // end namespace fawkes
105
106#endif
Fawkes library namespace.
plugin_message_type_t
Plugin message type.
Definition: messages.h:32
@ MSG_PLUGIN_UNLOAD
request plugin unload (plugin_unload_msg_t)
Definition: messages.h:36
@ MSG_PLUGIN_UNLOAD_FAILED
plugin unload failed (plugin_unload_failed_msg_t)
Definition: messages.h:38
@ MSG_PLUGIN_LIST_LOADED
request lif of loaded plugins
Definition: messages.h:42
@ MSG_PLUGIN_AVAIL_LIST_FAILED
listing available plugins failed
Definition: messages.h:41
@ MSG_PLUGIN_LOADED_LIST_FAILED
listing loaded plugins failed
Definition: messages.h:44
@ MSG_PLUGIN_AVAIL_LIST
list of available plugins (plugin_list_msg_t)
Definition: messages.h:40
@ MSG_PLUGIN_LOAD
request plugin load (plugin_load_msg_t)
Definition: messages.h:33
@ MSG_PLUGIN_LOAD_FAILED
plugin load failed (plugin_load_failed_msg_t)
Definition: messages.h:35
@ MSG_PLUGIN_LOADED_LIST
list of loaded plugins (plugin_list_msg_t)
Definition: messages.h:43
@ MSG_PLUGIN_LIST_AVAIL
request list of available plugins
Definition: messages.h:39
@ MSG_PLUGIN_SUBSCRIBE_WATCH
Subscribe for watching load/unload events.
Definition: messages.h:45
@ MSG_PLUGIN_UNSUBSCRIBE_WATCH
Unsubscribe from watching load/unload events.
Definition: messages.h:46
@ MSG_PLUGIN_UNLOADED
plugin unloaded (plugin_unloaded_msg_t)
Definition: messages.h:37
@ MSG_PLUGIN_LOADED
plugin loaded (plugin_loaded_msg_t)
Definition: messages.h:34
Dynamic list type.
Plugin list message.
Definition: messages.h:100
dynamic_list_t plugin_list
dynamically growing list of plugin names.
Definition: messages.h:101
Plugin load failed.
Definition: messages.h:78
Load plugin message.
Definition: messages.h:56
Plugin loaded message.
Definition: messages.h:72
Plugin unload failed.
Definition: messages.h:84
Unload plugin message.
Definition: messages.h:64
Plugin unloaded message.
Definition: messages.h:92