SpatiaLite
3.0.0-stable
|
00001 /* 00002 gaiaaux.h -- Gaia common utility functions 00003 00004 version 3.0, 2011 July 20 00005 00006 Author: Sandro Furieri a.furieri@lqt.it 00007 00008 ------------------------------------------------------------------------------ 00009 00010 Version: MPL 1.1/GPL 2.0/LGPL 2.1 00011 00012 The contents of this file are subject to the Mozilla Public License Version 00013 1.1 (the "License"); you may not use this file except in compliance with 00014 the License. You may obtain a copy of the License at 00015 http://www.mozilla.org/MPL/ 00016 00017 Software distributed under the License is distributed on an "AS IS" basis, 00018 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00019 for the specific language governing rights and limitations under the 00020 License. 00021 00022 The Original Code is the SpatiaLite library 00023 00024 The Initial Developer of the Original Code is Alessandro Furieri 00025 00026 Portions created by the Initial Developer are Copyright (C) 2008 00027 the Initial Developer. All Rights Reserved. 00028 00029 Contributor(s): 00030 00031 Alternatively, the contents of this file may be used under the terms of 00032 either the GNU General Public License Version 2 or later (the "GPL"), or 00033 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00034 in which case the provisions of the GPL or the LGPL are applicable instead 00035 of those above. If you wish to allow use of your version of this file only 00036 under the terms of either the GPL or the LGPL, and not to allow others to 00037 use your version of this file under the terms of the MPL, indicate your 00038 decision by deleting the provisions above and replace them with the notice 00039 and other provisions required by the GPL or the LGPL. If you do not delete 00040 the provisions above, a recipient may use your version of this file under 00041 the terms of any one of the MPL, the GPL or the LGPL. 00042 00043 */ 00044 00050 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00051 #ifdef DLL_EXPORT 00052 #define GAIAAUX_DECLARE __declspec(dllexport) 00053 #else 00054 #define GAIAAUX_DECLARE extern 00055 #endif 00056 #endif 00057 00058 #ifndef _GAIAAUX_H 00059 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00060 #define _GAIAAUX_H 00061 #endif 00062 00063 #ifdef __cplusplus 00064 extern "C" 00065 { 00066 #endif 00067 00068 /* constants */ 00070 #define GAIA_SQL_SINGLE_QUOTE 1001 00071 00072 #define GAIA_SQL_DOUBLE_QUOTE 1002 00073 00074 /* function prototipes */ 00075 00081 GAIAAUX_DECLARE const char *gaiaGetLocaleCharset (void); 00082 00095 GAIAAUX_DECLARE int gaiaConvertCharset (char **buf, const char *fromCs, 00096 const char *toCs); 00097 00110 GAIAAUX_DECLARE void *gaiaCreateUTF8Converter (const char *fromCS); 00111 00120 GAIAAUX_DECLARE void gaiaFreeUTF8Converter (void *cvtCS); 00121 00140 GAIAAUX_DECLARE char *gaiaConvertToUTF8 (void *cvtCS, const char *buf, 00141 int len, int *err); 00142 00152 GAIAAUX_DECLARE int gaiaIsReservedSqliteName (const char *name); 00153 00163 GAIAAUX_DECLARE int gaiaIsReservedSqlName (const char *name); 00164 00174 GAIAAUX_DECLARE int gaiaIllegalSqlName (const char *name); 00175 00190 GAIAAUX_DECLARE char *gaiaSingleQuotedSql (const char *value); 00191 00206 GAIAAUX_DECLARE char *gaiaDoubleQuotedSql (const char *value); 00207 00223 GAIAAUX_DECLARE char *gaiaQuotedSql (const char *value, int quote); 00224 00225 /* 00226 / DEPRECATED FUNCTION: gaiaCleanSqlString() 00227 / this function must not be used for any new project 00228 / it's still maintained for backward compatibility, 00229 / but will be probably removed in future versions 00230 */ 00231 00244 GAIAAUX_DECLARE void gaiaCleanSqlString (char *value); 00245 00246 #ifdef __cplusplus 00247 } 00248 #endif 00249 00250 #endif /* _GAIAAUX_H */