]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix some warnings in MSVC (no more deprecated warnings again), fixed g729 build in...
authorMichael Jerris <mike@jerris.com>
Mon, 9 Jan 2006 02:36:00 +0000 (02:36 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 9 Jan 2006 02:36:00 +0000 (02:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@303 d0543943-73ff-0310-b7d9-9358b9ac24b2

README
src/include/switch.h
src/include/switch_sqlite.h
src/mod/codecs/mod_codec_g729/mod_codec_g729.vcproj

diff --git a/README b/README
index 9ebdffae7978a8f19b114e9786634db51fe5bf58..0e52737cfca8ee41c7d32cbc27f7cde0ecda1e41 100644 (file)
--- a/README
+++ b/README
@@ -30,3 +30,11 @@ jrtplib: http://research.edm.luc.ac.be/jori/jrtplib/jrtplib-3.3.0.tar.gz
 Backup Download Locations:\r
 jthread: http://www.sofaswitch.org/mikej/jthread-1.1.2.tar.gz\r
 jrtplib: http://www.sofaswitch.org/mikej/jrtplib-3.3.0.tar.gz\r
+\r
+MSVC Notes:\r
+Freeswitch will compile and run from Microsoft Visual Studio 2005.  \r
+If using the Visual C++ Express edition, please make sure that the location of the include and lib directories are propperly set in the file\r
+C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages\VCProjectEngine.Dll.Express.Config.  \r
+The automated build process for te dependecy libraries will not work without these settings.\r
+\r
+\r
index 8fdf4ebb17814f0365a46d6eb709fed11ea6b6f8..99572729aa0239f2d1768886000cf3e335843816 100644 (file)
@@ -43,10 +43,12 @@ extern "C" {
 #include <config.h>
 #endif
 
+//Need to include this before any other includes (MSVC Bug)
+#include <switch_platform.h>
+
 #include <assert.h>
 
 #include <switch_version.h>
-#include <switch_platform.h>
 #include <switch_apr.h>
 #include <switch_sqlite.h>
 #include <switch_types.h>
index aaff4e1132127945d682c183cad17a0f7429f22d..4b3b88da26f5d9d1727d3438e175b48dac01c195 100644 (file)
@@ -398,11 +398,83 @@ DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);)
 DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt*,int);)
 #define switch_core_db_column_decltype16 sqlite3_column_decltype16
 
+/**
+** Register a callback function to be invoked whenever a new transaction
+** is committed.  The pArg argument is passed through to the callback.
+** callback.  If the callback function returns non-zero, then the commit
+** is converted into a rollback.
+**
+** If another function was previously registered, its pArg value is returned.
+** Otherwise NULL is returned.
+**
+** Registering a NULL function disables the callback.
+**
+******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
+*/
+DoxyDefine(void *switch_core_db_commit_hook(switch_core_db*, int(*)(void*), void*);)
 #define switch_core_db_commit_hook sqlite3_commit_hook
+
+/**
+** These functions return true if the given input string comprises
+** one or more complete SQL statements. For the sqlite3_complete() call,
+** the parameter must be a nul-terminated UTF-8 string. For
+** sqlite3_complete16(), a nul-terminated machine byte order UTF-16 string
+** is required.
+**
+** The algorithm is simple.  If the last token other than spaces
+** and comments is a semicolon, then return true.  otherwise return
+** false.
+*/
+DoxyDefine(int switch_core_db_complete(const char *sql);)
+DoxyDefine(int switch_core_db_complete16(const void *sql);)
 #define switch_core_db_complete sqlite3_complete
 #define switch_core_db_complete16 sqlite3_complete16
+
+/**
+** These two functions are used to add new collation sequences to the
+** sqlite3 handle specified as the first argument. 
+**
+** The name of the new collation sequence is specified as a UTF-8 string
+** for sqlite3_create_collation() and a UTF-16 string for
+** sqlite3_create_collation16(). In both cases the name is passed as the
+** second function argument.
+**
+** The third argument must be one of the constants SQLITE_UTF8,
+** SQLITE_UTF16LE or SQLITE_UTF16BE, indicating that the user-supplied
+** routine expects to be passed pointers to strings encoded using UTF-8,
+** UTF-16 little-endian or UTF-16 big-endian respectively.
+**
+** A pointer to the user supplied routine must be passed as the fifth
+** argument. If it is NULL, this is the same as deleting the collation
+** sequence (so that SQLite cannot call it anymore). Each time the user
+** supplied function is invoked, it is passed a copy of the void* passed as
+** the fourth argument to sqlite3_create_collation() or
+** sqlite3_create_collation16() as its first parameter.
+**
+** The remaining arguments to the user-supplied routine are two strings,
+** each represented by a [length, data] pair and encoded in the encoding
+** that was passed as the third argument when the collation sequence was
+** registered. The user routine should return negative, zero or positive if
+** the first string is less than, equal to, or greater than the second
+** string. i.e. (STRING1 - STRING2).
+*/
+DoxyDefine(int switch_core_db_create_collation(
+  switch_core_db*, 
+  const char *zName, 
+  int eTextRep, 
+  void*,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+);)
+DoxyDefine(int switch_core_db_create_collation16(
+  switch_core_db*, 
+  const char *zName, 
+  int eTextRep, 
+  void*,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+);)
 #define switch_core_db_create_collation sqlite3_create_collation
 #define switch_core_db_create_collation16 sqlite3_create_collation16
+
 #define switch_core_db_create_function sqlite3_create_function
 #define switch_core_db_create_function16 sqlite3_create_function16
 #define switch_core_db_data_count sqlite3_data_count
index 4e6d58e9f61ed579ff1ed91794842b38a266fd8c..5eecfab6dd80081eaceca122a91fe4da7bf8ded1 100644 (file)
@@ -42,7 +42,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\codec\libg729&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\codec\libg729\src\include&quot;"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\codec\libg729&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\include&quot;;&quot;$(InputDir)..\..\..\..\libs\include&quot;;&quot;$(InputDir)..\..\..\..\libs\codec\libg729\src\include&quot;"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"\r
                                RuntimeLibrary="0"\r
                                UsePrecompiledHeader="0"\r