libqb/include/qb/qbplugin_comp.h
Angus Salkeld 7a90cdda1f Remove unneccessary extern's.
http://gcc.gnu.org/ml/gcc/2009-04/msg00812.html
http://publications.gbdirect.co.uk/c_book/chapter4/linkage.html
http://www.eskimo.com/~scs/cclass/notes/sx5b.html

note in ipcs.c qb_ipcs_ipc_init() is extern'ed, I don't
think that this is needed - we'll soon see :)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-06-11 08:29:31 +10:00

67 lines
1.9 KiB
C

/*
* Copyright (C) 2006 Steven Dake <sdake@redhat.com>
*
* This file is part of libqb.
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QB_PLUGIN_COMP_H_DEFINED
#define QB_PLUGIN_COMP_H_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/*
* plugin Interface
*/
struct plugin_iface {
const char *name; /* Name of the interface */
int version; /* Version of this interface */
int *versions_replace; /* Versions that this interface can replace */
int versions_replace_count; /* Count of entries in version_replace */
char **dependencies; /* Dependent interfaces */
size_t dependency_count; /* Count of entires in dependencies */
int (*constructor) (void *context); /* Constructor for this interface */
void (*destructor) (void *context); /* Constructor for this interface */
void **interfaces; /* List of functions in interface */
};
/*
* plugin Component
*/
struct plugin_comp {
struct plugin_iface *ifaces; /* List of interfaces in this component */
size_t iface_count; /* size of ifaces list */
};
void plugin_component_register(struct plugin_comp *comp);
static inline void plugin_interfaces_set(struct plugin_iface *iface,
void *iface_list)
{
iface->interfaces = (void **)iface_list;
}
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* *INDENT-ON* */
#endif /* QB_PLUGIN_COMP_H_DEFINED */