blob: e22ffc1bed00d3663a2c87962cde0a4610088121 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*******************************************************************************
* Copyright (c) 2009, 2010 Philippe Proulx, École Polytechnique de Montréal
* Michael Sills-Lavoie, École Polytechnique de Montréal
* and others. All rights reserved.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
* You may elect to redistribute this code under either of these licenses.
*
* Contributors:
* Philippe Proulx - initial plugins system
* Michael Sills-Lavoie - deterministic plugins loading order
* Michael Sills-Lavoie - plugin's shared functions
*******************************************************************************/
/*
* Plugins system.
*/
#ifndef D_plugins
#define D_plugins
#include <tcf/framework/protocol.h>
extern const char *plugins_path;
/*
* Loads ALL plugins from the directory PATH_Plugins (from `config.h') in
* alphabetical order.
*/
extern int plugins_load(Protocol *, TCFBroadcastGroup *);
/*
* Initializes a particular plugin according to its path.
*/
extern int plugin_init(const char *, Protocol *, TCFBroadcastGroup *);
/*
* Add a new public plugin function for the other plugins to see.
*/
extern int plugin_add_function(const char *, void *);
/*
* Get a public function from its name.
*/
extern void * plugin_get_function(const char *);
/*
* Destroys loaded plugins.
*/
extern int plugins_destroy(void);
#endif /* D_plugins */
|