diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/Wasabi | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/replicant/Wasabi')
-rw-r--r-- | Src/replicant/Wasabi/Android.mk | 15 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Makefile | 42 | ||||
-rw-r--r-- | Src/replicant/Wasabi/ServiceManager.cpp | 201 | ||||
-rw-r--r-- | Src/replicant/Wasabi/ServiceManager.h | 52 | ||||
-rw-r--r-- | Src/replicant/Wasabi/SysCallbacks.cpp | 98 | ||||
-rw-r--r-- | Src/replicant/Wasabi/SysCallbacks.h | 31 | ||||
-rw-r--r-- | Src/replicant/Wasabi/VERSION | 1 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi-replicant.sln | 31 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi-replicant.vcxproj | 207 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi-replicant.vcxproj.filters | 42 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi.h | 10 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi.vcxproj | 143 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi.xcodeproj/project.pbxproj | 457 | ||||
-rw-r--r-- | Src/replicant/Wasabi/Wasabi.xcodeproj/xcshareddata/xcschemes/Wasabi.xcscheme | 59 | ||||
-rw-r--r-- | Src/replicant/Wasabi/api.cpp | 15 | ||||
-rw-r--r-- | Src/replicant/Wasabi/api__wasabi-replicant.h | 7 | ||||
-rw-r--r-- | Src/replicant/Wasabi/precomp.h | 11 |
17 files changed, 1422 insertions, 0 deletions
diff --git a/Src/replicant/Wasabi/Android.mk b/Src/replicant/Wasabi/Android.mk new file mode 100644 index 00000000..39ddff2a --- /dev/null +++ b/Src/replicant/Wasabi/Android.mk @@ -0,0 +1,15 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := Wasabi +LOCAL_C_INCLUDES := $(ROOT_REPLICANT) + +LOCAL_SRC_FILES := api.cpp ServiceManager.cpp SysCallbacks.cpp + + +LOCAL_STATIC_LIBRARIES := nu foundation +LOCAL_SHARED_LIBRARIES := nx + +include $(BUILD_STATIC_LIBRARY) + + diff --git a/Src/replicant/Wasabi/Makefile b/Src/replicant/Wasabi/Makefile new file mode 100644 index 00000000..444701b5 --- /dev/null +++ b/Src/replicant/Wasabi/Makefile @@ -0,0 +1,42 @@ +MODULE_NAME := Wasabi + +CPPSOURCES := api.cpp ServiceManager.cpp SysCallbacks.cpp + +LIBRARY_FILENAME := lib$(MODULE_NAME).a +OUTPUT_PATH := ../build/$(MODULE_NAME) +ARCHIVE_PATH := ../build/lib +LIBRARY_FILEPATH := ../build/lib/$(LIBRARY_FILENAME) + +CPPOBJS := $(patsubst %.cpp,$(OUTPUT_PATH)/%.o,$(CPPSOURCES)) +CPPDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(CPPOBJS)) +COBJS := $(patsubst %.c,$(OUTPUT_PATH)/%.o,$(CSOURCES)) +CDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(COBJS)) + +OBJS := $(CPPOBJS) $(COBJS) +DEPS := $(CPPDEPS) $(CDEPS) + +CFLAGS=-I.. +CPPFLAGS := ${CFLAGS} + + + +build: build-dir $(LIBRARY_FILEPATH) + +build-dir: + @mkdir -p $(OUTPUT_PATH) > /dev/null 2> /dev/null + @mkdir -p $(ARCHIVE_PATH) > /dev/null 2> /dev/null + +dep: + @rm ${DEPS} + +$(OUTPUT_PATH)/%.o: %.cpp + #@echo Compiling $*.cpp + @$(CXX) $(CPPFLAGS) -MMD -MF $(OUTPUT_PATH)/$*.d -MT $(OUTPUT_PATH)/$*.o -c $*.cpp -o $(OUTPUT_PATH)/$*.o + +$(LIBRARY_FILEPATH): ${OBJS} + $(AR) rcs $@ ${OBJS} + +clean: + -rm -f ${OBJS} $(LIBRARY_FILENAME) ${DEPS} + +-include $(DEPS) diff --git a/Src/replicant/Wasabi/ServiceManager.cpp b/Src/replicant/Wasabi/ServiceManager.cpp new file mode 100644 index 00000000..2d6887aa --- /dev/null +++ b/Src/replicant/Wasabi/ServiceManager.cpp @@ -0,0 +1,201 @@ +#include "ServiceManager.h" +#include "api__wasabi-replicant.h" +#include "service/ifc_servicefactory.h" +#include "service/svccb.h" + +using namespace nu; + +ServiceManager::ServiceManager() +{ +#ifdef _WIN32 + component_wait = CreateSemaphoreW(NULL, 0, LONG_MAX, NULL); +#else + sem_init(&component_wait, 0, 0); +#endif + +} + +ServiceManager::~ServiceManager() +{ + #ifdef _WIN32 + if (component_wait) + CloseHandle(component_wait); +#else + sem_destroy(&component_wait); +#endif +} + +int ServiceManager::Dispatchable_QueryInterface(GUID interface_guid, void **object) +{ + if (interface_guid == ifc_component_sync::GetInterfaceGUID()) + { + *object = (ifc_component_sync *)this; + } + return NErr_Unknown; +} +//------------------------------------------- +int ServiceManager::GetServiceIndex(GUID key) +{ + for(int idx = 0; idx < services_indexer.size(); idx++) + { + if (memcmp(&key, &services_indexer[idx], sizeof(GUID)) == 0) + { + return idx; + } + } + + return -1; +} + +int ServiceManager::Service_Register(ifc_serviceFactory *svc) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::service_register")); + GUID service_type = svc->GetServiceType(); + GUID service_id = svc->GetGUID(); + + // add the service to the master list + ifc_serviceFactory* new_factory = services[service_id]; + if (new_factory) // if someone already has this GUID, we need to replace + { + // replace factory in services_by_type map + ServiceList* type_list = services_by_type[service_type]; + + if (type_list) + { + for (ServiceList::iterator itr=type_list->begin();itr!=type_list->end();itr++) + { + ifc_serviceFactory *f = *itr; + if (f->GetGUID() == service_id) + { + *itr = svc; + } + } + } + // tell the old factory we're kicking its ass to the curb. + new_factory->ServiceNotify(ifc_serviceFactory::ONUNREGISTERED); + // HAKAN: + // Should we delete old factory? + // new_factory = svc; + } + else // not used yet, just assign + { + //new_factory = svc; + services_indexer.push_back(service_id); + + // add it to the by-type lookup + ServiceList *&type_list = services_by_type[service_type]; + if (!type_list) + type_list = new ServiceList; + + type_list->push_back(svc); + } + + services[service_id]=svc; + + // send notifications + svc->ServiceNotify(ifc_serviceFactory::ONREGISTERED); + + WASABI2_API_SYSCB->IssueCallback(Service::event_type, + Service::on_register, + (intptr_t)&service_type, reinterpret_cast<intptr_t>(svc)); + return NErr_Success; +} + +int ServiceManager::Service_Unregister(ifc_serviceFactory *svc) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::Service_Unregister")); + GUID service_type = svc->GetServiceType(); + GUID service_id = svc->GetGUID(); + + // remove it from the master list + ServiceMap::iterator itr = services.find(service_id); + if (itr != services.end()) + services.erase(itr); + + // and from the type lookup map + ServiceList *type_list = services_by_type[service_type]; + if (type_list) + { + //type_list->eraseObject(svc); + for (auto it = type_list->begin(); it != type_list->end(); it++) + { + if (*it == svc) + { + it = type_list->erase(it); + break; + } + } + } + WASABI2_API_SYSCB->IssueCallback(Service::event_type, Service::on_deregister, (intptr_t)&service_type, reinterpret_cast<intptr_t>(svc)); + svc->ServiceNotify(ifc_serviceFactory::ONUNREGISTERED); + + return NErr_Success; +} + +size_t ServiceManager::Service_GetServiceCount(GUID svc_type) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::Service_GetServiceCount")); + ServiceList *type_list = services_by_type[svc_type]; + if (type_list) + return type_list->size(); + else + return 0; +} + +ifc_serviceFactory *ServiceManager::Service_EnumService(GUID svc_type, size_t n) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::Service_EnumService")); + ServiceList *type_list = services_by_type[svc_type]; + if (type_list && (size_t)n < type_list->size()) + return type_list->at(n); + else + return 0; +} + +ifc_serviceFactory *ServiceManager::Service_EnumService(size_t n) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::Service_EnumService")); + if ((size_t)n < services.size()) + { + //return services.at(n).second; + if (n < services_indexer.size()) + { + GUID g = services_indexer[n]; + return services[g]; + } + } + + return 0; +} + +ifc_serviceFactory *ServiceManager::Service_GetServiceByGUID(GUID guid) +{ + AutoLock lock(serviceGuard LOCKNAME("ServiceManager::service_getServiceByGuid")); + ServiceMap::iterator itr = services.find(guid); + if (itr != services.end()) + return itr->second; + else + return 0; +} + +void ServiceManager::Service_ComponentDone() +{ +#ifdef _WIN32 + ReleaseSemaphore(component_wait, 1, NULL); +#else + sem_post(&component_wait); +#endif +} + +int ServiceManager::ComponentSync_Wait(size_t count) +{ + while (count--) + { +#ifdef _WIN32 + WaitForSingleObject(component_wait, INFINITE); +#else + sem_wait(&component_wait); +#endif + } + return NErr_Success; +} diff --git a/Src/replicant/Wasabi/ServiceManager.h b/Src/replicant/Wasabi/ServiceManager.h new file mode 100644 index 00000000..efcf70df --- /dev/null +++ b/Src/replicant/Wasabi/ServiceManager.h @@ -0,0 +1,52 @@ +#pragma once +#include "foundation/guid.h" +#include "service/api_service.h" +#include "nu/AutoLock.h" +#include "foundation/guid.h" +#include <vector> +#include <map> +#include "service/ifc_servicefactory.h" +#include "component/ifc_component_sync.h" +#ifdef _WIN32 +#include <Windows.h> +#else +#include <semaphore.h> +#endif + +class ServiceManager : public api_service, public ifc_component_sync +{ +public: + ServiceManager(); + ~ServiceManager(); + int WASABICALL Dispatchable_QueryInterface(GUID interface_guid, void **object); + + int WASABICALL Service_Register(ifc_serviceFactory *svc); + int WASABICALL Service_Unregister(ifc_serviceFactory *svc); + size_t WASABICALL Service_GetServiceCount(GUID svc_type); + ifc_serviceFactory *WASABICALL Service_EnumService(GUID svc_type, size_t n); + ifc_serviceFactory *WASABICALL Service_EnumService(size_t n); + ifc_serviceFactory *WASABICALL Service_GetServiceByGUID(GUID guid); + void WASABICALL Service_ComponentDone(); + +private: + int WASABICALL ComponentSync_Wait(size_t count); + int GetServiceIndex(GUID key); + +private: + nu::LockGuard serviceGuard; + typedef std::map<GUID, ifc_serviceFactory*> ServiceMap; + ServiceMap services; + std::vector<GUID> services_indexer; + + typedef std::vector<ifc_serviceFactory*> ServiceList; + std::map<GUID, ServiceList*> services_by_type; + + +#ifdef _WIN32 + HANDLE component_wait; +#else + sem_t component_wait; +#endif +}; + +extern ServiceManager service_manager; diff --git a/Src/replicant/Wasabi/SysCallbacks.cpp b/Src/replicant/Wasabi/SysCallbacks.cpp new file mode 100644 index 00000000..c77eaafd --- /dev/null +++ b/Src/replicant/Wasabi/SysCallbacks.cpp @@ -0,0 +1,98 @@ +#include "SysCallbacks.h" +#include "syscb/ifc_syscallback.h" + +using namespace nu; + +SysCallbacks::SysCallbacks() +{ + reentry=0; + inCallback=false; +} + +//note: it's OK to add in the middle of an issueCallback +//because new callbacks go at the end of the list +//and the lockguard prevents list corruption +int SysCallbacks::SysCallbacks_RegisterCallback(ifc_sysCallback *cb) +{ + AutoLock lock(callbackGuard LOCKNAME("SysCallbacks::syscb_registerCallback")); + callbacks.push_back(cb); + return 0; +} + +int SysCallbacks::SysCallbacks_UnregisterCallback(ifc_sysCallback *cb) +{ + AutoLock lock(callbackGuard LOCKNAME("SysCallbacks::syscb_deregisterCallback")); + if (inCallback) + deleteMeAfterCallbacks.push_back(cb); + else + { + //callbacks.eraseAll(cb); + auto it = callbacks.begin(); + while (it != callbacks.end()) + { + if (*it != cb) + { + it++; + continue; + } + + it = callbacks.erase(it); + } + } + return 0; +} + +int SysCallbacks::SysCallbacks_IssueCallback( GUID eventtype, int msg, intptr_t param1, intptr_t param2 ) +{ + AutoLock lock( callbackGuard LOCKNAME( "SysCallbacks::syscb_issueCallback" ) ); + reentry++; + inCallback = true; + + for ( ifc_sysCallback *l_call_back : callbacks ) + { + //if (!deleteMeAfterCallbacks.contains(callbacks[i]) && callbacks[i]->GetEventType() == eventtype) + if ( deleteMeAfterCallbacks.end() == std::find( deleteMeAfterCallbacks.begin(), deleteMeAfterCallbacks.end(), l_call_back ) && l_call_back->GetEventType() == eventtype ) + l_call_back->Notify( msg, param1, param2 ); + } + inCallback = false; + reentry--; + if ( reentry == 0 ) + { + for ( ifc_sysCallback *l_delete_me_after_call_back : deleteMeAfterCallbacks ) + { + //callbacks.eraseAll(deleteMeAfterCallbacks[i]); + auto it = callbacks.begin(); + while ( it != callbacks.end() ) + { + if ( *it != l_delete_me_after_call_back ) + { + it++; + continue; + } + + it = callbacks.erase( it ); + } + } + deleteMeAfterCallbacks.clear(); + } + return 0; +} + +ifc_sysCallback *SysCallbacks::SysCallbacks_Enum( GUID eventtype, size_t n ) +{ + AutoLock lock( callbackGuard LOCKNAME( "SysCallbacks::syscb_enum" ) ); + // TODO: maybe check !deleteMeAfterCallbacks.contains(callbacks[i]) + for ( ifc_sysCallback *callback : callbacks ) + { + if ( callback->GetEventType() == eventtype ) + { + if ( n-- == 0 ) + { + // benski> don't be fooled. most objects don't actually support reference counting + callback->Retain(); + return callback; + } + } + } + return 0; +} diff --git a/Src/replicant/Wasabi/SysCallbacks.h b/Src/replicant/Wasabi/SysCallbacks.h new file mode 100644 index 00000000..e570b2be --- /dev/null +++ b/Src/replicant/Wasabi/SysCallbacks.h @@ -0,0 +1,31 @@ +#pragma once + +#include "syscb/api_syscb.h" +#include <vector> +#include "nu/AutoLock.h" +#include "service/types.h" +#include "nx/nxstring.h" +#include "nswasabi/ServiceName.h" + +class SysCallbacks : public api_syscb +{ +public: + WASABI_SERVICE_NAME("System Callbacks API"); + +public: + SysCallbacks(); + int WASABICALL SysCallbacks_RegisterCallback(ifc_sysCallback *cb); + int WASABICALL SysCallbacks_UnregisterCallback(ifc_sysCallback *cb); + int WASABICALL SysCallbacks_IssueCallback(GUID eventtype, int msg, intptr_t param1 = 0, intptr_t param2 = 0); + ifc_sysCallback *WASABICALL SysCallbacks_Enum(GUID eventtype, size_t n); + +private: + nu::LockGuard callbackGuard; + std::vector<ifc_sysCallback*> callbacks; + std::vector<ifc_sysCallback*> deleteMeAfterCallbacks; + bool inCallback; + volatile int reentry; +}; + +extern SysCallbacks system_callbacks; + diff --git a/Src/replicant/Wasabi/VERSION b/Src/replicant/Wasabi/VERSION new file mode 100644 index 00000000..ea710abb --- /dev/null +++ b/Src/replicant/Wasabi/VERSION @@ -0,0 +1 @@ +1.2
\ No newline at end of file diff --git a/Src/replicant/Wasabi/Wasabi-replicant.sln b/Src/replicant/Wasabi/Wasabi-replicant.sln new file mode 100644 index 00000000..5e2343fb --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi-replicant.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29609.76 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wasabi-replicant", "Wasabi-replicant.vcxproj", "{4F34CA12-9F74-4A96-A917-8DEEA4961B31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|Win32 = Debug|Win32 + Release|x64 = Release|x64 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|x64.ActiveCfg = Debug|x64 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|x64.Build.0 = Debug|x64 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|Win32.ActiveCfg = Debug|Win32 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Debug|Win32.Build.0 = Debug|Win32 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|x64.ActiveCfg = Release|x64 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|x64.Build.0 = Release|x64 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|Win32.ActiveCfg = Release|Win32 + {4F34CA12-9F74-4A96-A917-8DEEA4961B31}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E4791259-2DCD-4881-9B00-FB79EE40D483} + EndGlobalSection +EndGlobal diff --git a/Src/replicant/Wasabi/Wasabi-replicant.vcxproj b/Src/replicant/Wasabi/Wasabi-replicant.vcxproj new file mode 100644 index 00000000..90d69db5 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi-replicant.vcxproj @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{4F34CA12-9F74-4A96-A917-8DEEA4961B31}</ProjectGuid> + <RootNamespace>Wasabi</RootNamespace> + <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Label="Vcpkg"> + <VcpkgEnableManifest>false</VcpkgEnableManifest> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgConfiguration>Debug</VcpkgConfiguration> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgConfiguration>Debug</VcpkgConfiguration> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <VcpkgInstalledDir> + </VcpkgInstalledDir> + <VcpkgUseStatic>false</VcpkgUseStatic> + <VcpkgTriplet>x86-windows-static-md</VcpkgTriplet> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MinSpace</Optimization> + <FavorSizeOrSpeed>Size</FavorSizeOrSpeed> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>None</DebugInformationFormat> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <Optimization>MinSpace</Optimization> + <FavorSizeOrSpeed>Size</FavorSizeOrSpeed> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN64;NDEBUG;_LIB;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>None</DebugInformationFormat> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Lib> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + </Lib> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="api.cpp" /> + <ClCompile Include="ServiceManager.cpp" /> + <ClCompile Include="SysCallbacks.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="api__wasabi-replicant.h" /> + <ClInclude Include="precomp.h" /> + <ClInclude Include="ServiceManager.h" /> + <ClInclude Include="SysCallbacks.h" /> + <ClInclude Include="Wasabi.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Src/replicant/Wasabi/Wasabi-replicant.vcxproj.filters b/Src/replicant/Wasabi/Wasabi-replicant.vcxproj.filters new file mode 100644 index 00000000..178a92a6 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi-replicant.vcxproj.filters @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <ClCompile Include="api.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="ServiceManager.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SysCallbacks.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="api__wasabi-replicant.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="precomp.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ServiceManager.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SysCallbacks.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Wasabi.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{95e2a764-deca-4145-a564-704813803543}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{7214e4d1-7da7-46b4-961e-a698574d8f9c}</UniqueIdentifier> + </Filter> + <Filter Include="Ressource Files"> + <UniqueIdentifier>{966f3869-2bed-42a3-885b-6104297b3673}</UniqueIdentifier> + </Filter> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Src/replicant/Wasabi/Wasabi.h b/Src/replicant/Wasabi/Wasabi.h new file mode 100644 index 00000000..90f80080 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi.h @@ -0,0 +1,10 @@ +#pragma once +#ifdef __cplusplus +extern "C" { +#endif + +int Wasabi_Init(); + +#ifdef __cplusplus +} +#endif diff --git a/Src/replicant/Wasabi/Wasabi.vcxproj b/Src/replicant/Wasabi/Wasabi.vcxproj new file mode 100644 index 00000000..75404ff2 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi.vcxproj @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <ClCompile Include="api.cpp" /> + <ClCompile Include="ServiceManager.cpp" /> + <ClCompile Include="SysCallbacks.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="api.h" /> + <ClInclude Include="ServiceManager.h" /> + <ClInclude Include="SysCallbacks.h" /> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{ABB5A3D1-9932-46B1-9488-F147C8B97868}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>Wasabi</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Src/replicant/Wasabi/Wasabi.xcodeproj/project.pbxproj b/Src/replicant/Wasabi/Wasabi.xcodeproj/project.pbxproj new file mode 100644 index 00000000..a1525782 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi.xcodeproj/project.pbxproj @@ -0,0 +1,457 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXAggregateTarget section */ + 00B733F3151BAC6B00A8251C /* Wasabi-prepare */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 00B733F4151BAC6B00A8251C /* Build configuration list for PBXAggregateTarget "Wasabi-prepare" */; + buildPhases = ( + 00B733FA151BACD800A8251C /* Generate Version Info */, + ); + dependencies = ( + 0039B365152A1EF600D96D3E /* PBXTargetDependency */, + ); + name = "Wasabi-prepare"; + productName = "Wasabi-version"; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 008840BF1506528900625F51 /* Wasabi.h in Headers */ = {isa = PBXBuildFile; fileRef = B195370314F5F8390056BB8C /* Wasabi.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 00B733A0151B6E2200A8251C /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B7339F151B6E2200A8251C /* version.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 00C27EA515375730008D95CD /* precomp.h in Headers */ = {isa = PBXBuildFile; fileRef = 00C27EA41537572F008D95CD /* precomp.h */; }; + B152EBB114F53F24005076BA /* api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B152EBAB14F53F24005076BA /* api.cpp */; }; + B152EBB214F53F24005076BA /* api.h in Headers */ = {isa = PBXBuildFile; fileRef = B152EBAC14F53F24005076BA /* api.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B152EBB314F53F24005076BA /* ServiceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B152EBAD14F53F24005076BA /* ServiceManager.cpp */; }; + B152EBB414F53F24005076BA /* ServiceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B152EBAE14F53F24005076BA /* ServiceManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B152EBB514F53F24005076BA /* SysCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B152EBAF14F53F24005076BA /* SysCallbacks.cpp */; }; + B152EBB614F53F24005076BA /* SysCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = B152EBB014F53F24005076BA /* SysCallbacks.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0039B364152A1EF600D96D3E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B152EB9B14F53EFD005076BA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 00B733AD151B76EB00A8251C; + remoteInfo = "Wasabi-cleanup"; + }; + 00B733B1151B775400A8251C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B152EB9B14F53EFD005076BA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 00B733AD151B76EB00A8251C; + remoteInfo = "Wasabi-cleanup"; + }; + 00B733F7151BAC8600A8251C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B152EB9B14F53EFD005076BA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 00B733F3151BAC6B00A8251C; + remoteInfo = "Wasabi-version"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00B7339E151B6D9000A8251C /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; }; + 00B7339F151B6E2200A8251C /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = version.h; path = $PROJECT_DERIVED_FILE_DIR/version.h; sourceTree = "<absolute>"; }; + 00C27EA41537572F008D95CD /* precomp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = precomp.h; sourceTree = "<group>"; }; + B152EBA414F53EFD005076BA /* libWasabi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWasabi.a; sourceTree = BUILT_PRODUCTS_DIR; }; + B152EBAB14F53F24005076BA /* api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = api.cpp; sourceTree = "<group>"; }; + B152EBAC14F53F24005076BA /* api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = api.h; sourceTree = "<group>"; }; + B152EBAD14F53F24005076BA /* ServiceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceManager.cpp; sourceTree = "<group>"; }; + B152EBAE14F53F24005076BA /* ServiceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceManager.h; sourceTree = "<group>"; }; + B152EBAF14F53F24005076BA /* SysCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SysCallbacks.cpp; sourceTree = "<group>"; }; + B152EBB014F53F24005076BA /* SysCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SysCallbacks.h; sourceTree = "<group>"; }; + B195370314F5F8390056BB8C /* Wasabi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Wasabi.h; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B152EBA114F53EFD005076BA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00B7339D151B6D7E00A8251C /* Version */ = { + isa = PBXGroup; + children = ( + 00B7339E151B6D9000A8251C /* VERSION */, + 00B7339F151B6E2200A8251C /* version.h */, + ); + name = Version; + sourceTree = "<group>"; + }; + B152EB9914F53EFD005076BA = { + isa = PBXGroup; + children = ( + 00C27EA41537572F008D95CD /* precomp.h */, + B195370314F5F8390056BB8C /* Wasabi.h */, + B152EBAB14F53F24005076BA /* api.cpp */, + B152EBAC14F53F24005076BA /* api.h */, + B152EBAD14F53F24005076BA /* ServiceManager.cpp */, + B152EBAE14F53F24005076BA /* ServiceManager.h */, + B152EBAF14F53F24005076BA /* SysCallbacks.cpp */, + B152EBB014F53F24005076BA /* SysCallbacks.h */, + 00B7339D151B6D7E00A8251C /* Version */, + B152EBA514F53EFD005076BA /* Products */, + ); + sourceTree = "<group>"; + }; + B152EBA514F53EFD005076BA /* Products */ = { + isa = PBXGroup; + children = ( + B152EBA414F53EFD005076BA /* libWasabi.a */, + ); + name = Products; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + B152EBA214F53EFD005076BA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B152EBB214F53F24005076BA /* api.h in Headers */, + B152EBB414F53F24005076BA /* ServiceManager.h in Headers */, + B152EBB614F53F24005076BA /* SysCallbacks.h in Headers */, + 008840BF1506528900625F51 /* Wasabi.h in Headers */, + 00B733A0151B6E2200A8251C /* version.h in Headers */, + 00C27EA515375730008D95CD /* precomp.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXLegacyTarget section */ + 00B733AD151B76EB00A8251C /* Wasabi-cleanup */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(NSBUILD_TOOLS_BIN_DIR)/cleanbuild --xcode-mode --libraries \"$(LIBRARY_PATH)\" \"$(PUBLIC_HEADERS_DIR)\" \"$(DWARF_DSYM_PATH)\" \"$(PROJECT_DERIVED_FILE_DIR)/version.*\""; + buildConfigurationList = 00B733AE151B76EB00A8251C /* Build configuration list for PBXLegacyTarget "Wasabi-cleanup" */; + buildPhases = ( + ); + buildToolPath = /bin/sh; + buildWorkingDirectory = ""; + dependencies = ( + ); + name = "Wasabi-cleanup"; + passBuildSettingsInEnvironment = 1; + productName = "Wasabi-cleanup"; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXNativeTarget section */ + B152EBA314F53EFD005076BA /* Wasabi */ = { + isa = PBXNativeTarget; + buildConfigurationList = B152EBA814F53EFD005076BA /* Build configuration list for PBXNativeTarget "Wasabi" */; + buildPhases = ( + B152EBA014F53EFD005076BA /* Sources */, + B152EBA114F53EFD005076BA /* Frameworks */, + B152EBA214F53EFD005076BA /* Headers */, + 00B733AB151B768500A8251C /* Install Public Headers */, + ); + buildRules = ( + ); + dependencies = ( + 00B733B2151B775400A8251C /* PBXTargetDependency */, + 00B733F8151BAC8600A8251C /* PBXTargetDependency */, + ); + name = Wasabi; + productName = Wasabi; + productReference = B152EBA414F53EFD005076BA /* libWasabi.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B152EB9B14F53EFD005076BA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = "Nullsoft, Inc."; + }; + buildConfigurationList = B152EB9E14F53EFD005076BA /* Build configuration list for PBXProject "Wasabi" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = B152EB9914F53EFD005076BA; + productRefGroup = B152EBA514F53EFD005076BA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B152EBA314F53EFD005076BA /* Wasabi */, + 00B733AD151B76EB00A8251C /* Wasabi-cleanup */, + 00B733F3151BAC6B00A8251C /* Wasabi-prepare */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00B733AB151B768500A8251C /* Install Public Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)$(PUBLIC_HEADERS_FOLDER_PATH)", + ); + name = "Install Public Headers"; + outputPaths = ( + "$(DSTROOT)$(PUBLIC_HEADERS_FOLDER_PATH)", + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "INSTALLTOOL=\"$NSBUILD_TOOLS_BIN_DIR/installtool\"\n$INSTALLTOOL --headers-only \\\n \"$SCRIPT_INPUT_FILE_0/\" \\\n \"$SCRIPT_OUTPUT_FILE_0\"\n"; + showEnvVarsInLog = 0; + }; + 00B733FA151BACD800A8251C /* Generate Version Info */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 12; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/VERSION", + "$(NSBUILD_TOOLS_SHARE_DIR)/nvgtool/lib-version.template.h", + ); + name = "Generate Version Info"; + outputPaths = ( + "$(PROJECT_DERIVED_FILE_DIR)/version.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "PRODUCT_VERSION=$(cat \"$SCRIPT_INPUT_FILE_0\")\n\nif [ ! -d \"$PROJECT_DERIVED_FILE_DIR\" ]; then\n mkdir -p \"$PROJECT_DERIVED_FILE_DIR\"\nfi\n\nNVGTOOL=\"$NSBUILD_TOOLS_BIN_DIR/nvgtool\"\n$NVGTOOL --product-name \"$PRODUCT_NAME\" \\\n --product-version \"$PRODUCT_VERSION\" \\\n --input-file \"$SCRIPT_INPUT_FILE_1\" \\\n --output-file \"$SCRIPT_OUTPUT_FILE_0\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B152EBA014F53EFD005076BA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B152EBB114F53F24005076BA /* api.cpp in Sources */, + B152EBB314F53F24005076BA /* ServiceManager.cpp in Sources */, + B152EBB514F53F24005076BA /* SysCallbacks.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0039B365152A1EF600D96D3E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 00B733AD151B76EB00A8251C /* Wasabi-cleanup */; + targetProxy = 0039B364152A1EF600D96D3E /* PBXContainerItemProxy */; + }; + 00B733B2151B775400A8251C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 00B733AD151B76EB00A8251C /* Wasabi-cleanup */; + targetProxy = 00B733B1151B775400A8251C /* PBXContainerItemProxy */; + }; + 00B733F8151BAC8600A8251C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 00B733F3151BAC6B00A8251C /* Wasabi-prepare */; + targetProxy = 00B733F7151BAC8600A8251C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00B733AF151B76EB00A8251C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DWARF_DSYM_PATH = "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_NAME).dSYM"; + LIBRARY_PATH = "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_NAME)"; + PUBLIC_HEADERS_DIR = "$(BUILT_PRODUCTS_DIR)$(PUBLIC_HEADERS_FOLDER_PATH)"; + }; + name = Debug; + }; + 00B733B0151B76EB00A8251C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + DWARF_DSYM_PATH = "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_NAME).dSYM"; + LIBRARY_PATH = "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_NAME)"; + PUBLIC_HEADERS_DIR = "$(BUILT_PRODUCTS_DIR)$(PUBLIC_HEADERS_FOLDER_PATH)"; + }; + name = Release; + }; + 00B733F5151BAC6B00A8251C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + }; + name = Debug; + }; + 00B733F6151BAC6B00A8251C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + }; + name = Release; + }; + B152EBA614F53EFD005076BA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + EXECUTABLE_EXTENSION = a; + EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME).$(EXECUTABLE_EXTENSION)"; + EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = precomp.h; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_PATH = "$(INSTALL_PATH_PREFIX)/lib"; + INSTALL_PATH_PREFIX = /usr/local; + MACOSX_DEPLOYMENT_TARGET = 10.6; + NSBUILD_TOOLS_BIN_DIR = "$(NSBUILD_TOOLS_DIR)/bin"; + NSBUILD_TOOLS_DIR = "$(SRCROOT)/../../build-tools"; + NSBUILD_TOOLS_SHARE_DIR = "$(NSBUILD_TOOLS_DIR)/share"; + ONLY_ACTIVE_ARCH = YES; + PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/include/$(PRODUCT_NAME)"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/include/$(PRODUCT_NAME)"; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = ".. $(BUILT_PRODUCTS_DIR)$(INSTALL_PATH_PREFIX)/include"; + }; + name = Debug; + }; + B152EBA714F53EFD005076BA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = "$(CURRENT_PROJECT_VERSION)"; + DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; + EXECUTABLE_EXTENSION = a; + EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME).$(EXECUTABLE_EXTENSION)"; + EXECUTABLE_PREFIX = lib; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = precomp.h; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_PATH = "$(INSTALL_PATH_PREFIX)/lib"; + INSTALL_PATH_PREFIX = /usr/local; + MACOSX_DEPLOYMENT_TARGET = 10.6; + NSBUILD_TOOLS_BIN_DIR = "$(NSBUILD_TOOLS_DIR)/bin"; + NSBUILD_TOOLS_DIR = "$(SRCROOT)/../../build-tools"; + NSBUILD_TOOLS_SHARE_DIR = "$(NSBUILD_TOOLS_DIR)/share"; + PRIVATE_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/include/$(PRODUCT_NAME)"; + PRODUCT_NAME = "$(PROJECT_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(INSTALL_PATH_PREFIX)/include/$(PRODUCT_NAME)"; + SDKROOT = macosx; + USER_HEADER_SEARCH_PATHS = ".. $(BUILT_PRODUCTS_DIR)$(INSTALL_PATH_PREFIX)/include"; + }; + name = Release; + }; + B152EBA914F53EFD005076BA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + }; + name = Debug; + }; + B152EBAA14F53EFD005076BA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00B733AE151B76EB00A8251C /* Build configuration list for PBXLegacyTarget "Wasabi-cleanup" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B733AF151B76EB00A8251C /* Debug */, + 00B733B0151B76EB00A8251C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 00B733F4151BAC6B00A8251C /* Build configuration list for PBXAggregateTarget "Wasabi-prepare" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00B733F5151BAC6B00A8251C /* Debug */, + 00B733F6151BAC6B00A8251C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B152EB9E14F53EFD005076BA /* Build configuration list for PBXProject "Wasabi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B152EBA614F53EFD005076BA /* Debug */, + B152EBA714F53EFD005076BA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B152EBA814F53EFD005076BA /* Build configuration list for PBXNativeTarget "Wasabi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B152EBA914F53EFD005076BA /* Debug */, + B152EBAA14F53EFD005076BA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B152EB9B14F53EFD005076BA /* Project object */; +} diff --git a/Src/replicant/Wasabi/Wasabi.xcodeproj/xcshareddata/xcschemes/Wasabi.xcscheme b/Src/replicant/Wasabi/Wasabi.xcodeproj/xcshareddata/xcschemes/Wasabi.xcscheme new file mode 100644 index 00000000..1a356279 --- /dev/null +++ b/Src/replicant/Wasabi/Wasabi.xcodeproj/xcshareddata/xcschemes/Wasabi.xcscheme @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0500" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "B152EBA314F53EFD005076BA" + BuildableName = "libWasabi.a" + BlueprintName = "Wasabi" + ReferencedContainer = "container:Wasabi.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> + <Testables> + </Testables> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/Src/replicant/Wasabi/api.cpp b/Src/replicant/Wasabi/api.cpp new file mode 100644 index 00000000..5ff52e74 --- /dev/null +++ b/Src/replicant/Wasabi/api.cpp @@ -0,0 +1,15 @@ +#include "Wasabi.h" +#include "api__wasabi-replicant.h" +#include "nswasabi/singleton.h" +#include "foundation/error.h" + +SysCallbacks system_callbacks; +ServiceManager service_manager; + +static SingletonServiceFactory<SysCallbacks, api_syscb> syscb_factory; + +int Wasabi_Init() +{ + syscb_factory.Register(WASABI2_API_SVC, WASABI2_API_SYSCB); + return NErr_Success; +} diff --git a/Src/replicant/Wasabi/api__wasabi-replicant.h b/Src/replicant/Wasabi/api__wasabi-replicant.h new file mode 100644 index 00000000..b5ffd4e5 --- /dev/null +++ b/Src/replicant/Wasabi/api__wasabi-replicant.h @@ -0,0 +1,7 @@ +#pragma once + +#include "ServiceManager.h" +#define WASABI2_API_SVC (&service_manager) + +#include "SysCallbacks.h" +#define WASABI2_API_SYSCB (&system_callbacks) diff --git a/Src/replicant/Wasabi/precomp.h b/Src/replicant/Wasabi/precomp.h new file mode 100644 index 00000000..be6449c0 --- /dev/null +++ b/Src/replicant/Wasabi/precomp.h @@ -0,0 +1,11 @@ +// +// precomp.h +// Wasabi +// + +#include "foundation/error.h" +#include "foundation/types.h" + +#ifdef __cplusplus +#include "api__wasabi-replicant.h" +#endif |