WvStreams
include
xplc
module.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
*
3
* XPLC - Cross-Platform Lightweight Components
4
* Copyright (C) 2002, Pierre Phaneuf
5
* Copyright (C) 2002, Net Integration Technologies, Inc.
6
* Copyright (C) 2002, Stéphane Lajoie
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation; either version 2.1 of
11
* the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21
* USA
22
*/
23
24
#ifndef __XPLC_MODULE_H__
25
#define __XPLC_MODULE_H__
26
27
#if defined(__GNUC__) && __GNUC__ > 3
28
# pragma GCC system_header
29
#endif
30
37
#include <
xplc/IObject.h
>
38
39
#ifdef UNSTABLE
40
#include <limits.h>
41
#endif
42
47
#define XPLC_MODULE_MAGIC 0x58504c43UL
48
53
#ifdef UNSTABLE
54
#define XPLC_MODULE_VERSION_MAJOR UINT_MAX
55
#define XPLC_MODULE_VERSION_MINOR 0
56
#else
57
#define XPLC_MODULE_VERSION_MAJOR 0
58
#define XPLC_MODULE_VERSION_MINOR 0
59
#endif
60
61
65
#ifdef WIN32
66
#define ENTRYPOINT extern "C" __declspec(dllexport)
67
#else
68
#define ENTRYPOINT extern "C"
69
#endif
70
76
struct
XPLC_ComponentEntry
{
78
const
UUID
& uuid;
79
IObject
* (*getObject)();
81
};
82
87
struct
XPLC_CategoryEntry
{
89
const
UUID
& category;
90
const
UUID
& uuid;
91
const
char
*
const
string;
93
};
94
98
struct
XPLC_ModuleInfo
{
103
unsigned
long
magic
;
109
unsigned
int
version_major
;
115
unsigned
int
version_minor
;
116
120
const
char
*
description
;
121
127
const
XPLC_ComponentEntry
*
const
components
;
128
132
const
XPLC_CategoryEntry
*
const
categories
;
133
};
134
139
ENTRYPOINT
const
XPLC_ModuleInfo
XPLC_Module
;
140
141
#endif
/* __XPLC_MODULE_H__ */
XPLC_Module
const ENTRYPOINT XPLC_ModuleInfo XPLC_Module
Definition of the XPLC module information structure.
Definition:
module.h:139
XPLC_ModuleInfo::categories
const XPLC_CategoryEntry *const categories
List of category registrations for the module.
Definition:
module.h:132
XPLC_ModuleInfo
Information for an XPLC module.
Definition:
module.h:98
XPLC_CategoryEntry
Entry for a category registration.
Definition:
module.h:87
XPLC_ComponentEntry
Entry for a component.
Definition:
module.h:76
XPLC_ModuleInfo::version_minor
unsigned int version_minor
The XPLC module ABI sub-version that this module conforms to.
Definition:
module.h:115
IObject.h
XPLC_ModuleInfo::description
const char * description
Description string for the module.
Definition:
module.h:120
XPLC_ModuleInfo::magic
unsigned long magic
XPLC module magic number.
Definition:
module.h:103
XPLC_ModuleInfo::version_major
unsigned int version_major
The XPLC module ABI version that this module conforms to.
Definition:
module.h:109
IObject
Definition:
IObject.h:65
_GUID
The structure underlying UUIDs.
Definition:
uuid.h:94
XPLC_ModuleInfo::components
const XPLC_ComponentEntry *const components
List of components supported by the module.
Definition:
module.h:127
ENTRYPOINT
#define ENTRYPOINT
Defines attributes required for exported symbols.
Definition:
module.h:68
Generated by
1.8.17