/*********************************************************************** * * Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; version 2.1 * of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, Novell, Inc. * * To contact Novell about this file by physical or electronic mail, * you may find current contact information at www.novell.com. * ***********************************************************************/ #if ! defined ( NWCONFIG_H ) #define NWCONFIG_H #include "npackon.h" #define T_OPTIONAL 0x80 #define T_NUMBER 0x01 #define T_INDEX 0x02 #define T_STRING 0x03 #define T_HEX_STRING 0x04 #define T_HEX_NUMBER 0x05 #define T_LONG_NUMBER 0x06 #define T_LONG_HEX 0x07 #define T_SET_1 0x10 #define T_SET_2 0x11 #define T_SET_3 0x12 #define T_SET_4 0x13 #define T_SET_5 0x14 #define T_SET_6 0x15 #define T_SET_7 0x16 #define T_SET_8 0x17 #define T_SET_9 0x18 #define T_SET_10 0x19 #define T_SET_11 0x1A #define T_SET_12 0x1B #define T_SET_13 0x1C #define T_SET_14 0x1D #define T_SET_15 0x1E #define T_SET_16 0x1F #define MAX_PARAMETERS 8 #define MAX_SECTION_NAME_SIZE 32 #define MAX_VALUE_SIZE 80 #define MAX_SET_ELEMENTS 20 typedef struct { int numberOfElements; int *elementCode; char N_FAR * N_FAR *elementName; int N_FAR *elementValue; } SetTableStruct; typedef struct { int paramType; long defaultValue; } TypeDefaultStruct; typedef union { char N_FAR *string; unsigned int number; unsigned long longNumber; } PARAMETER_TABLE_TYPE; typedef struct { int keywordCode; char N_FAR *keyword; void (N_FAR *function)(PARAMETER_TABLE_TYPE N_FAR *); TypeDefaultStruct typeDefault[MAX_PARAMETERS]; } GrammarTableStruct; #ifdef __cplusplus extern "C" { #endif N_EXTERN_LIBRARY( int ) NWParseConfig( PCHAR configFile, PCHAR sectionName, UINT sectionInstance, UINT grammarTableSize, GrammarTableStruct N_FAR *grammarTable, SetTableStruct N_FAR *setTable); #ifdef __cplusplus } #endif #include "npackoff.h" #endif