server/config.h

00001 /*
00002  * Copyright Ian Burnett 2005, 2006.
00003  *
00004  * This file is part of Ian's Interactive LCD controller (IILC).
00005  * 
00006  * IILC is free software; you can redistribute it and/or modify it under
00007  * the terms of the GNU General Public License as published by the Free
00008  * Software Foundation; either version 2 of the License, or (at your
00009  * option) any later version.
00010  *
00011  * IILC is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License along
00017  * with IILC; if not, write to the Free Software Foundation, Inc.,
00018  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
00019  */
00020 
00021 #if !defined(__CONFIG_H__)
00022 #define __CONFIG_H__
00023 
00024 #include "lcd.h"
00025 
00026 enum displayObjectType
00027 {
00028     OBJECT_TYPE_FAN,
00029     OBJECT_TYPE_LED,
00030     OBJECT_TYPE_TEMP
00031 };
00032 
00033 
00034 typedef struct _tag_config_object  * LPCONFIG_OBJECT;
00035 typedef struct _tag_config_module  * LPCONFIG_MODULE;
00036 typedef struct _tag_config_device  * LPCONFIG_DEVICE;
00037 typedef struct _tag_config_display * LPCONFIG_DISPLAY;
00038 typedef struct _tag_config_screen  * LPCONFIG_SCREEN;
00039 typedef struct _tag_config_window  * LPCONFIG_WINDOW;
00040 typedef struct _tag_config_file    * LPCONFIG_FILE;
00041 
00042 
00043 
00044 
00045 /****************************************************************************/
00046 /*                                                                          */
00047 /* Config file functions                                                    */
00048 /*                                                                          */
00049 /****************************************************************************/
00050 
00051 LCD_API int configFileCreate(LPCONFIG_FILE * ppFile,
00052                              const char * pszName);
00053 
00054 LCD_API int configFileAddDisplay(LPCONFIG_FILE pFile,
00055                                  LPCONFIG_DISPLAY pDisplay);
00056 
00057 LCD_API int configFileGetDisplayCount(LPCONFIG_FILE pConfig, 
00058                                       int * pnCount);
00059 
00060 LCD_API int configFileGetDisplay(LPCONFIG_FILE pFile,
00061                                  int nIndex,
00062                                  LPCONFIG_DISPLAY * ppDisplay);
00063 
00064 LCD_API int configFileValidate(LPCONFIG_FILE pFile);
00065 
00066 LCD_API int configFileDispose(LPCONFIG_FILE * ppFile);
00067 
00068 //LCD_API int configFileGetModuleCount(LPCONFIG_FILE pConfig, 
00069 //                                     int nDisplayIndex, 
00070 //                                     int * pnCount);
00071 
00072 /****************************************************************************/
00073 /*                                                                          */
00074 /* Config display functions                                                 */
00075 /*                                                                          */
00076 /****************************************************************************/
00077 
00078 LCD_API int configDisplayCreate(LPCONFIG_DISPLAY * ppDisplay,
00079                                 const char * pszDisplay);
00080 
00081 LCD_API int configDisplaySetDevice(LPCONFIG_DISPLAY pDisplay,
00082                                    LPCONFIG_DEVICE pDevice);
00083 
00084 LCD_API int configDisplayAddModule(LPCONFIG_DISPLAY pDisplay,
00085                                    LPCONFIG_MODULE pModule);
00086 
00087 LCD_API int configDisplayAddScreen(LPCONFIG_DISPLAY pDisplay,
00088                                    LPCONFIG_SCREEN pScreen);
00089 
00090 LCD_API int configDisplayGetDevice(LPCONFIG_DISPLAY pDisplay,
00091                                    LPCONFIG_DEVICE * ppDevice);
00092 
00093 LCD_API int configDisplayGetModuleCount(LPCONFIG_DISPLAY pDisplay,
00094                                         int * pnCount);
00095 
00096 LCD_API int configDisplayGetModule(LPCONFIG_DISPLAY pDisplay,
00097                                    int index,
00098                                    LPCONFIG_MODULE * ppModule);
00099 
00100 LCD_API int configDisplayGetScreenCount(LPCONFIG_DISPLAY pDisplay,
00101                                         int * pnCount);
00102 
00103 LCD_API int configDisplayGetScreen(LPCONFIG_DISPLAY pDisplay,
00104                                    int nIndex,
00105                                    LPCONFIG_SCREEN * ppScreen);
00106 
00107 LCD_API int configDisplayDispose(LPCONFIG_DISPLAY * ppDisplay);
00108 
00109 //LCD_API int configGetDisplayDeviceIndex(LPCONFIG_FILE pConfig,
00110 //                                int nDisplayIndex, 
00111 //                                int * nDeviceIndex);
00112 
00113 //LCD_API int configDisplayGetDescr(LPCONFIG_DISPLAY pDisplay, 
00114 //                                  const char ** ppszDescr);
00115 
00116 /****************************************************************************/
00117 /*                                                                          */
00118 /* Config device functions                                                  */
00119 /*                                                                          */
00120 /****************************************************************************/
00121 
00122 LCD_API int configDeviceCreate(LPCONFIG_DEVICE * ppDevice,
00123                                const char * pszName);
00124 
00125 LCD_API int configDeviceUseObject(LPCONFIG_DEVICE pDevice,
00126                                   enum displayObjectType type,
00127                                   int physical_id,
00128                                   const char * pszName);
00129 
00130 LCD_API int configDeviceSetClass(LPCONFIG_DEVICE pDevice,
00131                                  const char * pszClass);
00132 
00133 LCD_API int configDeviceSetPort(LPCONFIG_DEVICE pDevice,
00134                                 const char * pszPort);
00135 
00136 LCD_API int configDeviceGetName(LPCONFIG_DEVICE pDevice, 
00137                                 const char ** ppszName);
00138 
00139 LCD_API int configDeviceGetClass(LPCONFIG_DEVICE pDevice, 
00140                                  char ** ppszClass);
00141 
00142 LCD_API int configDeviceGetPort(LPCONFIG_DEVICE pDevice, 
00143                                 char ** ppszPort);
00144 
00145 LCD_API int configDeviceDispose(LPCONFIG_DEVICE * ppDevice);
00146 
00147 /****************************************************************************/
00148 /*                                                                          */
00149 /* Config module functions                                                  */
00150 /*                                                                          */
00151 /****************************************************************************/
00152 
00153 LCD_API int configModuleCreate(LPCONFIG_MODULE * ppModule,
00154                                const char * pszModule);
00155 
00156 
00157 LCD_API int configModuleControlObject(LPCONFIG_MODULE pModule,
00158                                       enum displayObjectType type,
00159                                       int object_id);
00160 
00161 LCD_API int configModuleReportObject(LPCONFIG_MODULE pModule,
00162                                      enum displayObjectType type,
00163                                      int object_id,
00164                                      const char * pszReportAs);
00165 
00166 LCD_API int configModuleVirtualObject(LPCONFIG_MODULE pModule,
00167                                       int module_id,
00168                                       int device_id,
00169                                       const char * pszObject);
00170 
00171 LCD_API int configModuleSetLibrary(LPCONFIG_MODULE pModule,
00172                                    const char * pszLibrary);
00173 
00174 LCD_API int configModuleGetLibrary(LPCONFIG_MODULE pModule, 
00175                                    const char ** ppszName);
00176 
00177 LCD_API int configModuleGetReportCount(LPCONFIG_MODULE pModule,
00178                                        int * pnCount);
00179 
00180 LCD_API int configModuleGetReportObject(LPCONFIG_MODULE pModule,
00181                                         int index,
00182                                         LPCONFIG_OBJECT * ppObject);
00183 
00184 LCD_API int configModuleDispose(LPCONFIG_MODULE * ppModule);
00185 
00186 /****************************************************************************/
00187 /*                                                                          */
00188 /* Config screen functions                                                  */
00189 /*                                                                          */
00190 /****************************************************************************/
00191 
00192 LCD_API int configScreenCreate(LPCONFIG_SCREEN * ppScreen,
00193                                const char * pszScreen);
00194 
00195 LCD_API int configScreenShowModule(LPCONFIG_SCREEN pScreen,
00196                                    const char * pszModule,
00197                                    int size_x, 
00198                                    int size_y,
00199                                    int pos_x,
00200                                    int pos_y);
00201 
00202 LCD_API int configScreenGetWindowCount(LPCONFIG_SCREEN pScreen,
00203                                        int * pnCount);
00204 
00205 LCD_API int configScreenGetWindow(LPCONFIG_SCREEN pScreen,
00206                                   int nIndex,
00207                                   LPCONFIG_WINDOW * ppWindow);
00208 
00209 /****************************************************************************/
00210 /*                                                                          */
00211 /* Config window functions                                                  */
00212 /*                                                                          */
00213 /****************************************************************************/
00214 
00215 LCD_API int configWindowCreate(LPCONFIG_WINDOW * ppWindow,
00216                                int width,
00217                                int height,
00218                                int x,
00219                                int y,
00220                                const char * pszModule);
00221 
00222 LCD_API int configWindowGetLocation(LPCONFIG_WINDOW pWindow,
00223                                     int * pnX,
00224                                     int * pnY);
00225 
00226 LCD_API int configWindowGetSize(LPCONFIG_WINDOW pWindow,
00227                                 int * pnWidth,
00228                                 int * pnHeight);
00229 
00230 LCD_API int configWindowGetModuleName(LPCONFIG_WINDOW pWindow,
00231                                       const char ** ppszModuleName);
00232 
00233 LCD_API int configWindowDispose(LPCONFIG_WINDOW * ppWindow);
00234 
00235 /****************************************************************************/
00236 /*                                                                          */
00237 /* Config object functions                                                  */
00238 /*                                                                          */
00239 /****************************************************************************/
00240 
00241 
00242 LCD_API int configObjectGetId(LPCONFIG_OBJECT pObject,
00243                               unsigned int * pnId);
00244 
00245 LCD_API int configObjectGetName(LPCONFIG_OBJECT pObject,
00246                                 char ** pszName);
00247 
00248 LCD_API int configObjectGetType(LPCONFIG_OBJECT pObject,
00249                                 enum displayObjectType * pType);
00250 
00251 
00252 
00253 #endif
00254 

Generated on Mon Jul 17 01:36:11 2006 for IILC by  doxygen 1.4.6