mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
fs_cli now builds on windows, does not yet work
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10911 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
63250c91b4
commit
d69c309548
@ -998,7 +998,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_siren", "src\mod\codecs
|
|||||||
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C} = {1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}
|
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C} = {1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esl", "libs\esl\esl.2008.vcproj", "{CF405366-9558-4AE8-90EF-5E21B51CCB4E}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esl", "libs\esl\src\esl.2008.vcproj", "{CF405366-9558-4AE8-90EF-5E21B51CCB4E}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fs_cli", "libs\esl\fs_cli.2008.vcproj", "{D2FB8043-D208-4AEE-8F18-3B5857C871B9}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{CF405366-9558-4AE8-90EF-5E21B51CCB4E} = {CF405366-9558-4AE8-90EF-5E21B51CCB4E}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -1762,6 +1767,10 @@ Global
|
|||||||
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|Win32.ActiveCfg = Release|Win32
|
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|Win32.Build.0 = Release|Win32
|
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|Win32.Build.0 = Release|Win32
|
||||||
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|x64.ActiveCfg = Release|Win32
|
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|x64.ActiveCfg = Release|Win32
|
||||||
|
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Debug|x64.ActiveCfg = Debug|Win32
|
||||||
|
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Release|x64.ActiveCfg = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
258
libs/esl/fs_cli.2008.vcproj
Normal file
258
libs/esl/fs_cli.2008.vcproj
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="fs_cli"
|
||||||
|
ProjectGUID="{D2FB8043-D208-4AEE-8F18-3B5857C871B9}"
|
||||||
|
RootNamespace="fs_cli"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="..\..\w32\winlibs.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=""$(InputDir)\src\include""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
DisableSpecificWarnings="4100;6053;4706"
|
||||||
|
EnablePREfast="true"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)$(ConfigurationName)/fs_cli.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="$(OutDir)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/fs_cli.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets="..\..\w32\winlibs.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""$(InputDir)\src\include""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
WarnAsError="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
DisableSpecificWarnings="4100;6053;4706"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)$(ConfigurationName)/fs_cli.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="$(OutDir)"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/fs_cli.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="fs_cli.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_buffer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_caller.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_channel.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_config.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_console.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_core.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_frame.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_loadable_module.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_module_interfaces.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_types.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_utils.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
@ -2,13 +2,20 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <esl.h>
|
#include <esl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/select.h>
|
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define strdup(src) _strdup(src)
|
||||||
|
#define usleep(time) Sleep(time/1000)
|
||||||
|
#else
|
||||||
|
#include <sys/select.h>
|
||||||
#include <histedit.h>
|
#include <histedit.h>
|
||||||
|
#define HAVE_EDITLINE
|
||||||
|
#endif
|
||||||
|
|
||||||
static char prompt_str[512] = "";
|
static char prompt_str[512] = "";
|
||||||
static char hostname[512] = "";
|
static char hostname[512] = "";
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
static char *prompt(EditLine * e)
|
static char *prompt(EditLine * e)
|
||||||
{
|
{
|
||||||
return prompt_str;
|
return prompt_str;
|
||||||
@ -17,6 +24,8 @@ static char *prompt(EditLine * e)
|
|||||||
static EditLine *el;
|
static EditLine *el;
|
||||||
static History *myhistory;
|
static History *myhistory;
|
||||||
static HistEvent ev;
|
static HistEvent ev;
|
||||||
|
#endif
|
||||||
|
|
||||||
static int running = 1;
|
static int running = 1;
|
||||||
static int thread_running = 0;
|
static int thread_running = 0;
|
||||||
|
|
||||||
@ -149,8 +158,8 @@ static int get_profile(const char *name, cli_profile_t **profile)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
esl_handle_t handle = {{0}};
|
esl_handle_t handle = {{0}};
|
||||||
int count;
|
int count = 0;
|
||||||
const char *line;
|
const char *line = NULL;
|
||||||
char cmd_str[1024] = "";
|
char cmd_str[1024] = "";
|
||||||
char hfile[512] = "/tmp/fs_cli_history";
|
char hfile[512] = "/tmp/fs_cli_history";
|
||||||
char cfile[512] = "/tmp/fs_cli_config";
|
char cfile[512] = "/tmp/fs_cli_config";
|
||||||
@ -199,7 +208,7 @@ int main(int argc, char *argv[])
|
|||||||
} else if (!strcasecmp(var, "port")) {
|
} else if (!strcasecmp(var, "port")) {
|
||||||
int pt = atoi(val);
|
int pt = atoi(val);
|
||||||
if (pt > 0) {
|
if (pt > 0) {
|
||||||
profiles[cur].port = pt;
|
profiles[cur].port = (esl_port_t)pt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,6 +237,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
esl_thread_create_detached(msg_thread_run, &handle);
|
esl_thread_create_detached(msg_thread_run, &handle);
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
el = el_init(__FILE__, stdout, stdout, stdout);
|
el = el_init(__FILE__, stdout, stdout, stdout);
|
||||||
el_set(el, EL_PROMPT, &prompt);
|
el_set(el, EL_PROMPT, &prompt);
|
||||||
el_set(el, EL_EDITOR, "emacs");
|
el_set(el, EL_EDITOR, "emacs");
|
||||||
@ -241,6 +251,7 @@ int main(int argc, char *argv[])
|
|||||||
history(myhistory, &ev, H_SETSIZE, 800);
|
history(myhistory, &ev, H_SETSIZE, 800);
|
||||||
el_set(el, EL_HIST, history, myhistory);
|
el_set(el, EL_HIST, history, myhistory);
|
||||||
history(myhistory, &ev, H_LOAD, hfile);
|
history(myhistory, &ev, H_LOAD, hfile);
|
||||||
|
#endif
|
||||||
|
|
||||||
snprintf(cmd_str, sizeof(cmd_str), "log info\n\n");
|
snprintf(cmd_str, sizeof(cmd_str), "log info\n\n");
|
||||||
esl_send_recv(&handle, cmd_str);
|
esl_send_recv(&handle, cmd_str);
|
||||||
@ -249,19 +260,28 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
line = el_gets(el, &count);
|
line = el_gets(el, &count);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
if (!esl_strlen_zero(line)) {
|
if (!esl_strlen_zero(line)) {
|
||||||
char *cmd = strdup(line);
|
char *cmd = strdup(line);
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
const LineInfo *lf = el_line(el);
|
const LineInfo *lf = el_line(el);
|
||||||
char *foo = (char *) lf->buffer;
|
char *foo = (char *) lf->buffer;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((p = strrchr(cmd, '\r')) || (p = strrchr(cmd, '\n'))) {
|
if ((p = strrchr(cmd, '\r')) || (p = strrchr(cmd, '\n'))) {
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
assert(cmd != NULL);
|
assert(cmd != NULL);
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
history(myhistory, &ev, H_ENTER, line);
|
history(myhistory, &ev, H_ENTER, line);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!strncasecmp(cmd, "...", 3)) {
|
if (!strncasecmp(cmd, "...", 3)) {
|
||||||
goto done;
|
goto done;
|
||||||
@ -277,8 +297,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
el_deletestr(el, strlen(foo) + 1);
|
el_deletestr(el, strlen(foo) + 1);
|
||||||
memset(foo, 0, strlen(foo));
|
memset(foo, 0, strlen(foo));
|
||||||
|
#endif
|
||||||
free(cmd);
|
free(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -290,11 +312,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
||||||
|
#ifdef HAVE_EDITLINE
|
||||||
history(myhistory, &ev, H_SAVE, hfile);
|
history(myhistory, &ev, H_SAVE, hfile);
|
||||||
|
|
||||||
/* Clean up our memory */
|
/* Clean up our memory */
|
||||||
history_end(myhistory);
|
history_end(myhistory);
|
||||||
el_end(el);
|
el_end(el);
|
||||||
|
#endif
|
||||||
|
|
||||||
esl_disconnect(&handle);
|
esl_disconnect(&handle);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="src/include"
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_EXPORTS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_EXPORTS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -119,7 +119,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="src/include"
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_EXPORTS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_EXPORTS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -178,19 +178,19 @@
|
|||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\esl.c"
|
RelativePath=".\esl.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\esl_config.c"
|
RelativePath=".\esl_config.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\esl_event.c"
|
RelativePath=".\esl_event.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\esl_threadmutex.c"
|
RelativePath=".\esl_threadmutex.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
@ -200,19 +200,19 @@
|
|||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\include\esl.h"
|
RelativePath=".\include\esl.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\include\esl_config.h"
|
RelativePath=".\include\esl_config.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\include\esl_event.h"
|
RelativePath=".\include\esl_event.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\include\esl_threadmutex.h"
|
RelativePath=".\include\esl_threadmutex.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
@ -261,7 +261,7 @@ static void default_logger(const char *file, const char *func, int line, int lev
|
|||||||
|
|
||||||
esl_logger_t esl_log = null_logger;
|
esl_logger_t esl_log = null_logger;
|
||||||
|
|
||||||
void esl_global_set_logger(esl_logger_t logger)
|
ESL_DECLARE(void) esl_global_set_logger(esl_logger_t logger)
|
||||||
{
|
{
|
||||||
if (logger) {
|
if (logger) {
|
||||||
esl_log = logger;
|
esl_log = logger;
|
||||||
@ -270,7 +270,7 @@ void esl_global_set_logger(esl_logger_t logger)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void esl_global_set_default_logger(int level)
|
ESL_DECLARE(void) esl_global_set_default_logger(int level)
|
||||||
{
|
{
|
||||||
if (level < 0 || level > 7) {
|
if (level < 0 || level > 7) {
|
||||||
level = 7;
|
level = 7;
|
||||||
|
@ -281,10 +281,10 @@ typedef enum {
|
|||||||
#define ESL_LOG_EMERG ESL_PRE, ESL_LOG_LEVEL_EMERG
|
#define ESL_LOG_EMERG ESL_PRE, ESL_LOG_LEVEL_EMERG
|
||||||
typedef void (*esl_logger_t)(const char *file, const char *func, int line, int level, const char *fmt, ...);
|
typedef void (*esl_logger_t)(const char *file, const char *func, int line, int level, const char *fmt, ...);
|
||||||
|
|
||||||
extern esl_logger_t esl_log;
|
ESL_DECLARE_DATA extern esl_logger_t esl_log;
|
||||||
|
|
||||||
void esl_global_set_logger(esl_logger_t logger);
|
ESL_DECLARE(void) esl_global_set_logger(esl_logger_t logger);
|
||||||
void esl_global_set_default_logger(int level);
|
ESL_DECLARE(void) esl_global_set_default_logger(int level);
|
||||||
|
|
||||||
#include "esl_event.h"
|
#include "esl_event.h"
|
||||||
#include "esl_threadmutex.h"
|
#include "esl_threadmutex.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user