WvStreams
|
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 00027 #if defined(__GNUC__) && __GNUC__ > 3 00028 # pragma GCC system_header 00029 #endif 00030 00037 #include <xplc/IObject.h> 00038 00039 #ifdef UNSTABLE 00040 #include <limits.h> 00041 #endif 00042 00047 #define XPLC_MODULE_MAGIC 0x58504c43UL 00048 00053 #ifdef UNSTABLE 00054 #define XPLC_MODULE_VERSION_MAJOR UINT_MAX 00055 #define XPLC_MODULE_VERSION_MINOR 0 00056 #else 00057 #define XPLC_MODULE_VERSION_MAJOR 0 00058 #define XPLC_MODULE_VERSION_MINOR 0 00059 #endif 00060 00061 00065 #ifdef WIN32 00066 #define ENTRYPOINT extern "C" __declspec(dllexport) 00067 #else 00068 #define ENTRYPOINT extern "C" 00069 #endif 00070 00076 struct XPLC_ComponentEntry { 00078 const UUID& uuid; 00079 IObject* (*getObject)(); 00081 }; 00082 00087 struct XPLC_CategoryEntry { 00089 const UUID& category; 00090 const UUID& uuid; 00091 const char* const string; 00093 }; 00094 00098 struct XPLC_ModuleInfo { 00103 unsigned long magic; 00109 unsigned int version_major; 00115 unsigned int version_minor; 00116 00120 const char* description; 00121 00127 const XPLC_ComponentEntry* const components; 00128 00132 const XPLC_CategoryEntry* const categories; 00133 }; 00134 00139 ENTRYPOINT const XPLC_ModuleInfo XPLC_Module; 00140 00141 #endif /* __XPLC_MODULE_H__ */