mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-17 01:21:06 +08:00
Refresh release artifacts and fix HTTP tutorial
This commit is contained in:
@@ -2368,7 +2368,7 @@ WindowsAutomationServiceRenderer
|
||||
HttpAutomationService
|
||||
***********************************************************************/
|
||||
|
||||
class HttpAutomationService : public inter_process::HttpServerApi
|
||||
class HttpAutomationService : public inter_process::windows_http::HttpServerApi
|
||||
{
|
||||
protected:
|
||||
WString urlControls;
|
||||
|
||||
+4092
-51
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,118 @@
|
||||
/***********************************************************************
|
||||
THIS FILE IS AUTOMATICALLY GENERATED. DO NOT MODIFY
|
||||
DEVELOPER: Zihan Chen(vczh)
|
||||
***********************************************************************/
|
||||
#include "Vlpp.h"
|
||||
#include "VlppOS.h"
|
||||
|
||||
/***********************************************************************
|
||||
.\ASYNCSOCKET.LINUX.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
|
||||
Linux implementation of IAsyncSocket(Server|Client)
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_INTERPROCESS_ASYNCSOCKET_LINUX
|
||||
#define VCZH_INTERPROCESS_ASYNCSOCKET_LINUX
|
||||
|
||||
|
||||
#if defined VCZH_GCC && !defined VCZH_APPLE
|
||||
|
||||
namespace vl::inter_process::async_tcp_socket::linux_socket
|
||||
{
|
||||
class AsyncSocketServer : public Object, public virtual IAsyncSocketServer
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketServer(vint port);
|
||||
~AsyncSocketServer();
|
||||
|
||||
WaitForClientResult OnClientConnected(IAsyncSocketConnection* connection) override;
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
bool IsStopped() override;
|
||||
};
|
||||
|
||||
class AsyncSocketClient : public Object, public virtual IAsyncSocketClient
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketClient(vint port);
|
||||
~AsyncSocketClient();
|
||||
|
||||
IAsyncSocketConnection* GetConnection() override;
|
||||
void WaitForServer() override;
|
||||
ClientStatus GetStatus() override;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\ASYNCSOCKET.MACOS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
|
||||
macOS implementation of IAsyncSocket(Server|Client)
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_INTERPROCESS_ASYNCSOCKET_MACOS
|
||||
#define VCZH_INTERPROCESS_ASYNCSOCKET_MACOS
|
||||
|
||||
|
||||
#if defined VCZH_GCC && defined VCZH_APPLE
|
||||
|
||||
namespace vl::inter_process::async_tcp_socket::macos_socket
|
||||
{
|
||||
class AsyncSocketServer : public Object, public virtual IAsyncSocketServer
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketServer(vint port);
|
||||
~AsyncSocketServer();
|
||||
|
||||
WaitForClientResult OnClientConnected(IAsyncSocketConnection* connection) override;
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
bool IsStopped() override;
|
||||
};
|
||||
|
||||
class AsyncSocketClient : public Object, public virtual IAsyncSocketClient
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketClient(vint port);
|
||||
~AsyncSocketClient();
|
||||
|
||||
IAsyncSocketConnection* GetConnection() override;
|
||||
void WaitForServer() override;
|
||||
ClientStatus GetStatus() override;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1755
-7
File diff suppressed because it is too large
Load Diff
+72
-11
@@ -6,7 +6,68 @@ DEVELOPER: Zihan Chen(vczh)
|
||||
#include "Vlpp.h"
|
||||
|
||||
/***********************************************************************
|
||||
.\NETWORKPROTOCOL.WINDOWS.H
|
||||
.\ASYNCSOCKET\ASYNCSOCKET.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
|
||||
Windows implementation of IAsyncSocket(Server|Client)
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_INTERPROCESS_ASYNCSOCKET_WINDOWS
|
||||
#define VCZH_INTERPROCESS_ASYNCSOCKET_WINDOWS
|
||||
|
||||
// Winsock must precede every include that can include windows.h.
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <WinSock2.h>
|
||||
#include <MSWSock.h>
|
||||
#define _WINSOCKAPI_
|
||||
#include <Windows.h>
|
||||
|
||||
|
||||
namespace vl::inter_process::async_tcp_socket::windows_socket
|
||||
{
|
||||
class AsyncSocketServer : public Object, public virtual IAsyncSocketServer
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketServer(vint port);
|
||||
~AsyncSocketServer();
|
||||
|
||||
WaitForClientResult OnClientConnected(IAsyncSocketConnection* connection) override;
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
bool IsStopped() override;
|
||||
};
|
||||
|
||||
class AsyncSocketClient : public Object, public virtual IAsyncSocketClient
|
||||
{
|
||||
private:
|
||||
class Impl;
|
||||
Impl* impl = nullptr;
|
||||
|
||||
public:
|
||||
AsyncSocketClient(vint port);
|
||||
~AsyncSocketClient();
|
||||
|
||||
IAsyncSocketConnection* GetConnection() override;
|
||||
void WaitForServer() override;
|
||||
ClientStatus GetStatus() override;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\WINDOWS\NETWORKPROTOCOL.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -62,7 +123,7 @@ namespace vl::inter_process
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\HTTPCLIENTAPI.WINDOWS.H
|
||||
.\WINDOWS\HTTPCLIENTAPI.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -77,7 +138,7 @@ Interfaces:
|
||||
#define VCZH_INTERPROCESS_WINDOWS_HTTPCLIENTAPI
|
||||
|
||||
|
||||
namespace vl::inter_process
|
||||
namespace vl::inter_process::windows_http
|
||||
{
|
||||
|
||||
/// <summary>An http request.</summary>
|
||||
@@ -218,7 +279,7 @@ public:
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\HTTPCLIENT.WINDOWS.H
|
||||
.\WINDOWS\HTTPCLIENT.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -233,7 +294,7 @@ Interfaces:
|
||||
#define VCZH_INTERPROCESS_WINDOWS_HTTPCLIENT
|
||||
|
||||
|
||||
namespace vl::inter_process
|
||||
namespace vl::inter_process::windows_http
|
||||
{
|
||||
|
||||
class HttpClient : public Object, public virtual INetworkProtocolConnection, public virtual INetworkProtocolClient
|
||||
@@ -328,7 +389,7 @@ public:
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\HTTPSERVERAPI.WINDOWS.H
|
||||
.\WINDOWS\HTTPSERVERAPI.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -343,7 +404,7 @@ Interfaces:
|
||||
#define VCZH_INTERPROCESS_WINDOWS_HTTPSERVERAPI
|
||||
|
||||
|
||||
namespace vl::inter_process
|
||||
namespace vl::inter_process::windows_http
|
||||
{
|
||||
|
||||
/// <summary>A response to be sent by <see cref="HttpServerApi"/>.</summary>
|
||||
@@ -423,7 +484,7 @@ public:
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\HTTPSERVER.WINDOWS.H
|
||||
.\WINDOWS\HTTPSERVER.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -438,7 +499,7 @@ Interfaces:
|
||||
#define VCZH_INTERPROCESS_WINDOWS_HTTPSERVER
|
||||
|
||||
|
||||
namespace vl::inter_process
|
||||
namespace vl::inter_process::windows_http
|
||||
{
|
||||
|
||||
class HttpServer;
|
||||
@@ -525,7 +586,7 @@ public:
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\NAMEDPIPE.WINDOWS.H
|
||||
.\WINDOWS\NAMEDPIPE.WINDOWS.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
@@ -541,7 +602,7 @@ Interfaces:
|
||||
#define VCZH_INTERPROCESS_WINDOWS_NAMEDPIPE
|
||||
|
||||
|
||||
namespace vl::inter_process
|
||||
namespace vl::inter_process::named_pipe
|
||||
{
|
||||
|
||||
class NamedPipeServer;
|
||||
|
||||
+1292
-3
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,24 @@ void CategorizeCodeFiles(
|
||||
{
|
||||
auto name = XmlGetAttribute(e, L"name")->value.value;
|
||||
auto pattern = wupper(XmlGetAttribute(e, L"pattern")->value.value);
|
||||
List<WString> patterns;
|
||||
while (true)
|
||||
{
|
||||
auto index = pattern.IndexOf(L';');
|
||||
if (index == -1)
|
||||
{
|
||||
if (pattern.Length() > 0)
|
||||
{
|
||||
patterns.Add(pattern);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (index > 0)
|
||||
{
|
||||
patterns.Add(pattern.Left(index));
|
||||
}
|
||||
pattern = pattern.Right(pattern.Length() - index - 1);
|
||||
}
|
||||
|
||||
List<WString> exceptions;
|
||||
CopyFrom(
|
||||
@@ -28,7 +46,10 @@ void CategorizeCodeFiles(
|
||||
From(files).Where([&](const FilePath& f)
|
||||
{
|
||||
auto path = GetCodePackPath(f.GetFullPath());
|
||||
return INVLOC.FindFirst(path, pattern, Locale::IgnoreCase).key != -1
|
||||
return From(patterns).Any([&](const WString& pattern)
|
||||
{
|
||||
return INVLOC.FindFirst(path, pattern, Locale::IgnoreCase).key != -1;
|
||||
})
|
||||
&& From(exceptions).All([&](const WString& ex)
|
||||
{
|
||||
return INVLOC.FindFirst(path, ex, Locale::IgnoreCase).key == -1;
|
||||
|
||||
@@ -3,23 +3,31 @@ USE_GCC?=NO
|
||||
|
||||
# add "--stdlib=libc++" after bug #808086 is fixed
|
||||
|
||||
CPP_DEPENDENCY_OPTIONS=-MMD -MP -MF $(@:.o=.d) -MT $@
|
||||
CPP_PLATFORM_NAME=$(shell uname -s)
|
||||
CPP_PLATFORM_COMPILE_OPTIONS=
|
||||
CPP_PLATFORM_LINK_OPTIONS=
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
CPP_PLATFORM_LINK_OPTIONS=-framework CoreFoundation
|
||||
ifeq ($(CPP_PLATFORM_NAME),Darwin)
|
||||
CPP_PLATFORM_COMPILE_OPTIONS=-fblocks
|
||||
CPP_PLATFORM_LINK_OPTIONS=-framework CoreFoundation -framework Network
|
||||
else ifeq ($(CPP_PLATFORM_NAME),Linux)
|
||||
CPP_PLATFORM_LINK_OPTIONS=-luring
|
||||
endif
|
||||
|
||||
-include $(wildcard ./Obj/*.d)
|
||||
|
||||
ifeq ($(USE_GCC), YES)
|
||||
CPP_LINK=g++ -std=c++20 -g -pthread -o $@ $^ $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS)
|
||||
else ifeq ($(COVERAGE),NO)
|
||||
CPP_LINK=clang++ -std=c++20 -pthread -g $(CPP_COMPILE_OPTIONS) -o $@ $^ $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS)
|
||||
else
|
||||
CPP_LINK=clang++ -std=c++20 -pthread -g --coverage -o $@ $^ $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GCC), YES)
|
||||
CPP_LINK=g++ -std=c++20 -g -pthread $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS) -o $@ $^
|
||||
CPP_COMPILE=g++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) $(CPP_PLATFORM_COMPILE_OPTIONS) $(CPP_DEPENDENCY_OPTIONS) -o $@ -c $<
|
||||
else ifeq ($(COVERAGE),NO)
|
||||
CPP_LINK=clang++ -std=c++20 -pthread -g $(CPP_COMPILE_OPTIONS) $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS) -o $@ $^
|
||||
CPP_COMPILE=clang++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) $(CPP_PLATFORM_COMPILE_OPTIONS) $(CPP_DEPENDENCY_OPTIONS) -o $@ -c $<
|
||||
else
|
||||
CPP_LINK=clang++ -std=c++20 -pthread -g --coverage $(CPP_LINK_OPTIONS) $(CPP_PLATFORM_LINK_OPTIONS) -o $@ $^
|
||||
endif
|
||||
|
||||
ifeq ($(USE_GCC), YES)
|
||||
CPP_COMPILE=g++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) -o $@ -c $<
|
||||
else ifeq ($(COVERAGE),NO)
|
||||
CPP_COMPILE=clang++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) -o $@ -c $<
|
||||
else
|
||||
CPP_COMPILE=clang++ -std=c++20 -g -fprofile-arcs -ftest-coverage $(CPP_COMPILE_OPTIONS) -o $@ -c $<
|
||||
CPP_COMPILE=clang++ -std=c++20 -g -fprofile-arcs -ftest-coverage $(CPP_COMPILE_OPTIONS) $(CPP_PLATFORM_COMPILE_OPTIONS) $(CPP_DEPENDENCY_OPTIONS) -o $@ -c $<
|
||||
endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
using namespace vl::collections;
|
||||
using namespace vl::stream;
|
||||
#if defined VCZH_MSVC
|
||||
using namespace vl::inter_process;
|
||||
using namespace vl::inter_process::windows_http;
|
||||
#endif
|
||||
|
||||
class ViewModel : public Object, public demo::IViewModel
|
||||
|
||||
Reference in New Issue
Block a user