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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>swmgr.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.9.1 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
<hr><h1>swmgr.h</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font>
00002 <font class="comment"> * swmgr.h - definition of class SWMgr used to interact with an install</font>
00003 <font class="comment"> * base of sword modules.</font>
00004 <font class="comment"> *</font>
00005 <font class="comment"> * $Id: swmgr_8h-source.html,v 1.4 2002/01/22 14:20:28 jansorg Exp $</font>
00006 <font class="comment"> *</font>
00007 <font class="comment"> * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</font>
00008 <font class="comment"> * CrossWire Bible Society</font>
00009 <font class="comment"> * P. O. Box 2528</font>
00010 <font class="comment"> * Tempe, AZ 85280-2528</font>
00011 <font class="comment"> *</font>
00012 <font class="comment"> * This program is free software; you can redistribute it and/or modify it</font>
00013 <font class="comment"> * under the terms of the GNU General Public License as published by the</font>
00014 <font class="comment"> * Free Software Foundation version 2.</font>
00015 <font class="comment"> *</font>
00016 <font class="comment"> * This program is distributed in the hope that it will be useful, but</font>
00017 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00018 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00019 <font class="comment"> * General Public License for more details.</font>
00020 <font class="comment"> *</font>
00021 <font class="comment"> */</font>
00022
00039 <font class="preprocessor">#ifndef SWMGR_H</font>
00040 <font class="preprocessor"></font><font class="preprocessor">#define SWMGR_H</font>
00041 <font class="preprocessor"></font>
00042 <font class="preprocessor">#include <sys/types.h></font>
00043 <font class="preprocessor">#include <string></font>
00044 <font class="preprocessor">#include <map></font>
00045 <font class="preprocessor">#include <list></font>
00046 <font class="preprocessor">#include <swmodule.h></font>
00047 <font class="preprocessor">#include <swconfig.h></font>
00048 <font class="preprocessor">#include <swlog.h></font>
00049 <font class="preprocessor">#include <swfiltermgr.h></font>
00050
00051 <font class="preprocessor">#include <defs.h></font>
00052
00053 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00054
00055 <font class="keyword">typedef</font> map < string, SWModule *, less < string > >ModMap;
00056 <font class="keyword">typedef</font> list < string > OptionsList;
00057 <font class="keyword">typedef</font> map < string, SWFilter * >FilterMap;
00058
<a name="l00069"></a><a class="code" href="class_s_w_mgr.html">00069</a> <font class="keyword">class </font>SWDLLEXPORT <a class="code" href="class_s_w_mgr.html">SWMgr</a> {
00070
00071 <font class="keyword">private</font>:
00072 <font class="keywordtype">void</font> commonInit(<a class="code" href="class_s_w_config.html">SWConfig</a> * iconfig, <a class="code" href="class_s_w_config.html">SWConfig</a> * isysconfig, <font class="keywordtype">bool</font> autoload, SWFilterMgr *filterMgr);
00073
00074 <font class="keyword">protected</font>:
00075 SWFilterMgr *filterMgr; <font class="comment">//made protected because because BibleTime needs it</font>
00076 <a class="code" href="class_s_w_config.html">SWConfig</a> * myconfig; <font class="comment">//made protected because because BibleTime needs it</font>
00077 <a class="code" href="class_s_w_config.html">SWConfig</a> *mysysconfig;
00078 <font class="keywordtype">void</font> CreateMods ();
00079 <a class="code" href="class_s_w_module.html">SWModule</a> *CreateMod (string name, string driver, ConfigEntMap & section);
00080 <font class="keywordtype">void</font> DeleteMods ();
00081 <font class="keywordtype">char</font> configType; <font class="comment">// 0 = file; 1 = directory</font>
00082 FilterMap optionFilters;
00083 FilterMap cipherFilters;
00084 SWFilter *gbfplain;
00085 SWFilter *thmlplain;
00086 FilterList cleanupFilters;
00087 OptionsList options;
00088 <font class="keyword">virtual</font> <font class="keywordtype">void</font> init (); <font class="comment">// use to initialize before loading modules</font>
00089 <font class="keyword">virtual</font> <font class="keywordtype">char</font> AddModToConfig (<font class="keywordtype">int</font> conffd, <font class="keyword">const</font> <font class="keywordtype">char</font> *fname);
00090 <font class="keyword">virtual</font> <font class="keywordtype">void</font> loadConfigDir (<font class="keyword">const</font> <font class="keywordtype">char</font> *ipath);
00091 <font class="keyword">virtual</font> <font class="keywordtype">void</font> AddGlobalOptions (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section,
00092 ConfigEntMap::iterator start,
00093 ConfigEntMap::iterator end);
00094 <font class="keyword">virtual</font> <font class="keywordtype">void</font> AddLocalOptions (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section,
00095 ConfigEntMap::iterator start,
00096 ConfigEntMap::iterator end);
00097
00103 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#b8">AddEncodingFilters</a> (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section);
00109 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#b9">AddRenderFilters</a> (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section);
00115 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#b10">AddStripFilters</a> (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section);
00121 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#b11">AddRawFilters</a> (<a class="code" href="class_s_w_module.html">SWModule</a> * module, ConfigEntMap & section);
00122
00123 <font class="keyword">public</font>:
<a name="l00128"></a><a class="code" href="class_s_w_mgr.html#p0">00128</a> <font class="keyword">static</font> <font class="keywordtype">bool</font> debug;
00129 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *globalConfPath;
00133 <font class="keyword">static</font> <font class="keywordtype">void</font> findConfig (<font class="keywordtype">char</font> *configType, <font class="keywordtype">char</font> **prefixPath,
00134 <font class="keywordtype">char</font> **configPath);
<a name="l00143"></a><a class="code" href="class_s_w_mgr.html#m0">00143</a> <a class="code" href="class_s_w_config.html">SWConfig</a> *config;
00147 <a class="code" href="class_s_w_config.html">SWConfig</a> *sysconfig;
<a name="l00170"></a><a class="code" href="class_s_w_mgr.html#m2">00170</a> ModMap Modules;
<a name="l00174"></a><a class="code" href="class_s_w_mgr.html#m3">00174</a> <font class="keywordtype">char</font> *prefixPath;
00178 <font class="keywordtype">char</font> *configPath;
00179
00187 <a class="code" href="class_s_w_mgr.html#a0">SWMgr</a> (<a class="code" href="class_s_w_config.html">SWConfig</a> * iconfig = 0, <a class="code" href="class_s_w_config.html">SWConfig</a> * isysconfig = 0, <font class="keywordtype">bool</font> autoload = <font class="keyword">true</font>, SWFilterMgr *filterMgr = 0);
00192 <a class="code" href="class_s_w_mgr.html#a0">SWMgr</a> (SWFilterMgr *filterMgr);
00202 <a class="code" href="class_s_w_mgr.html#a0">SWMgr</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *iConfigPath, <font class="keywordtype">bool</font> autoload = <font class="keyword">true</font>, SWFilterMgr *filterMgr = 0);
00208 <font class="keyword">virtual</font> <a class="code" href="class_s_w_mgr.html#a3">~SWMgr</a> ();
00212 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#a4">InstallScan</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *dir);
00217 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#a5">Load</a> ();
00225 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_s_w_mgr.html#a6">setGlobalOption</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option, <font class="keyword">const</font> <font class="keywordtype">char</font> *value);
00230 <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="class_s_w_mgr.html#a7">getGlobalOption</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00236 <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="class_s_w_mgr.html#a8">getGlobalOptionTip</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00240 <font class="keyword">virtual</font> OptionsList <a class="code" href="class_s_w_mgr.html#a9">getGlobalOptions</a> ();
00244 <font class="keyword">virtual</font> OptionsList getGlobalOptionValues (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00286 <font class="keyword">virtual</font> <font class="keywordtype">signed</font> <font class="keywordtype">char</font> <a class="code" href="class_s_w_mgr.html#a11">setCipherKey</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *modName, <font class="keyword">const</font> <font class="keywordtype">char</font> *key);
00287 };
00288 <font class="preprocessor">#endif</font>
</font></pre></div><hr><address><small>Generated at Tue Jan 22 14:52:48 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.9.1 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-2001</small></address>
</body>
</html>
|