2 Copyright 2004-2005 Chris Tallon
3 Copyright 2004-2005 University Of Bradford
5 This file is part of VOMP.
7 VOMP is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 VOMP is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with VOMP; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #define MAX_FILENAME_LENGTH 500
32 #define BUFFER_LENGTH 1500
39 int init(char* fileName);
43 char* getValueString(char* section, char* key);
44 long getValueLong(char* section, char* key, int* failure);
45 long long getValueLongLong(char* section, char* key, int* failure);
46 double getValueDouble(char* section, char* key, int* failure);
48 int setValueString(char* section, char* key, char* newValue);
49 int setValueLong(char* section, char* key, long newValue);
50 int setValueLongLong(char* section, char* key, long long newValue);
51 int setValueDouble(char* section, char* key, double newValue);
53 int deleteValue(char* section, char* key); // err.. delete "key".
54 char* getSectionKeyNames(char* section, int& numberOfReturns, int& length);
57 pthread_mutex_t fileLock;
61 char fileName[MAX_FILENAME_LENGTH];
62 char fileNameTemp[MAX_FILENAME_LENGTH];
65 char buffer[BUFFER_LENGTH];
70 int findSection(char* section);
71 int findKey(char* key);
72 void trim(char* sting);
73 FILE* copyToHere(long position);
74 int copyRest(FILE* newFile);