Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

module.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * XPLC - Cross-Platform Lightweight Components
00004  * Copyright (C) 2002, Pierre Phaneuf
00005  * Copyright (C) 2002, Net Integration Technologies, Inc.
00006  * Copyright (C) 2002, Stéphane Lajoie
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021  * USA
00022  */
00023 
00024 #ifndef __XPLC_MODULE_H__
00025 #define __XPLC_MODULE_H__
00026 
00033 #include <xplc/IObject.h>
00034 
00035 #ifdef UNSTABLE
00036 #include <limits.h>
00037 #endif
00038 
00043 #define XPLC_MODULE_MAGIC 0x58504c43UL
00044 
00049 #ifdef UNSTABLE
00050 #define XPLC_MODULE_VERSION_MAJOR UINT_MAX
00051 #define XPLC_MODULE_VERSION_MINOR 0
00052 #else
00053 #define XPLC_MODULE_VERSION_MAJOR 0
00054 #define XPLC_MODULE_VERSION_MINOR 0
00055 #endif
00056 
00057 
00061 #ifdef WIN32
00062 #define ENTRYPOINT extern "C" __declspec(dllexport)
00063 #else
00064 #define ENTRYPOINT extern "C"
00065 #endif
00066 
00072 struct XPLC_ComponentEntry {
00074   const UUID& uuid;
00075   IObject* (*getObject)();
00077 };
00078 
00082 struct XPLC_ModuleInfo {
00087   unsigned long magic;
00093   unsigned int version_major;
00099   unsigned int version_minor;
00100 
00104   const char* description;
00105 
00111   const XPLC_ComponentEntry* const components;
00112 
00118   bool (*loadModule)();
00125   bool (*unloadModule)();
00126 };
00127 
00132 ENTRYPOINT const XPLC_ModuleInfo XPLC_Module;
00133 
00134 #endif /* __XPLC_MODULE_H__ */

Generated on Sun Sep 26 04:01:25 2004 for XPLC by doxygen1.2.18