Skip to content

Commit

Permalink
[DEPRECATED] Make sure the IController interface deprecated warnings … (
Browse files Browse the repository at this point in the history
#1437)

* [DEPRECATED] Make sure the IController interface deprecated warnings do not break the automated windows build.

* [OOPS] Forgot to change the selction box for other flavours..
  • Loading branch information
pwielders authored Oct 24, 2023
1 parent ddc2008 commit 4cace77
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 43 deletions.
26 changes: 12 additions & 14 deletions Source/WPEFramework/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
namespace WPEFramework {
namespace Plugin {

class Controller
PUSH_WARNING(DISABLE_WARNING_DEPRECATED_USE) // for now we must support the deprecated interface for backwards compatibility reasons
class Controller
: public PluginHost::IPlugin
, public PluginHost::IWeb
, public PluginHost::JSONRPC
Expand Down Expand Up @@ -353,22 +354,18 @@ namespace Plugin {

// IUnknown methods
// -------------------------------------------------------------------------------------------------------
PUSH_WARNING(DISABLE_WARNING_DEPRECATED_USE) // for now we must support the deprecated interface for backwards compatibility reasons

BEGIN_INTERFACE_MAP(Controller)
INTERFACE_ENTRY(PluginHost::IPlugin)
INTERFACE_ENTRY(PluginHost::IWeb)
INTERFACE_ENTRY(PluginHost::IDispatcher)
INTERFACE_ENTRY(PluginHost::IController)
INTERFACE_ENTRY(Exchange::Controller::IConfiguration)
INTERFACE_ENTRY(Exchange::Controller::IDiscovery)
INTERFACE_ENTRY(Exchange::Controller::ISystemManagement)
INTERFACE_ENTRY(Exchange::Controller::IMetadata)
INTERFACE_ENTRY(Exchange::Controller::ILifeTime)
INTERFACE_ENTRY(PluginHost::IPlugin)
INTERFACE_ENTRY(PluginHost::IWeb)
INTERFACE_ENTRY(PluginHost::IDispatcher)
INTERFACE_ENTRY(PluginHost::IController)
INTERFACE_ENTRY(Exchange::Controller::IConfiguration)
INTERFACE_ENTRY(Exchange::Controller::IDiscovery)
INTERFACE_ENTRY(Exchange::Controller::ISystemManagement)
INTERFACE_ENTRY(Exchange::Controller::IMetadata)
INTERFACE_ENTRY(Exchange::Controller::ILifeTime)
END_INTERFACE_MAP

POP_WARNING()

private:
// ILocalDispatcher methods
// -------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -411,6 +408,7 @@ POP_WARNING()
std::vector<PluginHost::ISubSystem::subsystem> _externalSubsystems;
std::list<Exchange::Controller::ILifeTime::INotification*> _observers;
};
POP_WARNING()
}
}

Expand Down
77 changes: 57 additions & 20 deletions Source/WPEFramework/ExampleConfigWindows.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"binding": "127.0.0.1",
"idletime": 60,
"ipv6": false,
"persistentpath": "C:/ThunderWin/artifacts/Persistent",
"volatilepath": "C:/ThunderWin/artifacts/temp",
"datapath": "C:/ThunderWin/artifacts/Debug/Plugins",
"systempath": "C:/ThunderWin/artifacts/Debug",
"proxystubpath": "C:/ThunderWin/artifacts/ProxyStubs/Debug",
"communicator": "0.0.0.0:62000",
"persistentpath": "D:/Domotica/artifacts/Persistent",
"volatilepath": "D:/Domotica/artifacts/temp",
"datapath": "D:/Domotica/artifacts/Debug/Plugins",
"systempath": "D:/Domotica/artifacts/Debug",
"proxystubpath": "D:/Domotica/artifacts/ProxyStubs/Debug",
"communicator": "127.0.0.1:62000",
"redirect": "Service/Controller/UI",
"messagingport": 63000,
"observe": {
"proxystubpath": "C:/ThunderWin/artifacts/dynamic/proxystubs",
"configpath": "C:/ThunderWin/artifacts/dynamic/config"
"proxystubpath": "D:/Domotica/artifacts/dynamic/proxystubs",
"configpath": "D:/Domotica/artifacts/dynamic/config"
},
"messaging": {
"port": 63000,
"logging": {
"abbreviated": true,
"settings": [
Expand All @@ -29,6 +29,14 @@
"settings": [
{
"module": "ZWave",
"enabled": true
},
{
"module": "Plugin_ZWaveControl",
"enabled": true
},
{
"module": "Plugin_TestPlugin",
"enabled": false
},
{
Expand All @@ -41,6 +49,10 @@
},
{
"module": "Plugin_BridgeLink",
"enabled": false
},
{
"module": "Plugin_DNSServer",
"enabled": true
}
]
Expand All @@ -66,6 +78,17 @@
}
}
},
{
"callsign": "TestPlugin",
"locator": "libTestPlugin.so",
"classname": "TestPlugin",
"autostart": false,
"configuration": {
"root": {
"mode": "Local"
}
}
},
{
"callsign": "Doofah",
"locator": "libDoofah.so",
Expand Down Expand Up @@ -131,9 +154,10 @@
"callsign": "ZWaveControl",
"locator": "libZWaveControl.so",
"classname": "ZWaveControl",
"autostart": false,
"autostart": true,
"configuration": {
"port": "\\\\.\\COM5"
"port": "\\\\.\\COM4",
"key": "ba:09:87:65:43:21:de:ad:be:ef:12:34:56:78:90:ab"
}
},
{
Expand Down Expand Up @@ -258,9 +282,9 @@
},
{
"autostart": false,
"callsign": "ScriptEngine",
"classname": "ScriptEngine",
"locator": "libScriptEngine.so"
"callsign": "RuleEngine",
"classname": "RuleEngine",
"locator": "libRuleEngine.so"
},
{
"autostart": false,
Expand Down Expand Up @@ -291,7 +315,7 @@
"callsign": "IOControl",
"locator": "libIOControl.so",
"classname": "IOControl",
"autostart": true,
"autostart": false,
"configuration": {
"port": "\\\\.\\COM24",
"pins": [
Expand Down Expand Up @@ -338,7 +362,7 @@
"callsign": "OneWireControl",
"locator": "libOneWireControl.so",
"classname": "OneWireControl",
"autostart": true,
"autostart": false,
"configuration": {
"port": "\\\\.\\COM24",
"devices": [
Expand All @@ -354,7 +378,7 @@
"callsign": "I2CControl",
"locator": "libI2CControl.so",
"classname": "I2CControl",
"autostart": true,
"autostart": false,
"configuration": {
"port": "\\\\.\\COM24",
"devices": [
Expand Down Expand Up @@ -386,7 +410,7 @@
"callsign": "JSONRPCPlugin",
"locator": "libJSONRPCPlugin.so",
"classname": "JSONRPCPlugin",
"autostart": true
"autostart": false
},
{
"callsign": "OpenCDMi",
Expand Down Expand Up @@ -431,6 +455,7 @@
"locator": "libWebServer.so",
"classname": "WebServer",
"autostart": false,
"communicator": "127.0.0.1:2349",
"configuration": {
"port": 8080,
"binding": "0.0.0.0",
Expand All @@ -455,7 +480,7 @@
},
{
"callsign": "TimeSync",
"locator": "1libtimesync.so",
"locator": "libtimesync.so",
"classname": "TimeSync",
"autostart": false,
"configuration": {
Expand Down Expand Up @@ -500,7 +525,8 @@
"callsign": "Dictionary",
"locator": "libdictionary.so",
"classname": "Dictionary",
"autostart": false
"autostart": false,
"communicator": "127.0.0.1:5522"
},
{
"callsign": "DIALServer",
Expand Down Expand Up @@ -556,6 +582,17 @@
"mapfile": "ir-remote.json"
}
},
{
"callsign": "DNSServer",
"locator": "libDNSServer.so",
"classname": "DNSServer",
"autostart": false,
"configuration": {
"bind": "0.0.0.0:53",
"multicast": "224.0.0.251:5353",
"server": [ "192.168.1.250:53", "8.8.8.8:53" ]
}
},
{
"autostart": false,
"callsign": "WebKitBrowser",
Expand Down
2 changes: 1 addition & 1 deletion Source/core/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Core {
{
size_t position = pathInfo.find("|");
if (position != string::npos) {
Core::NumberType<uint16_t> number(pathInfo.substr(position + 1).c_str(), (pathInfo.length() - position));
Core::NumberType<uint16_t> number(pathInfo.substr(position + 1).c_str(), static_cast<uint32_t>(pathInfo.length() - position));
permission = number.Value();
}
path = pathInfo.substr(0, position);
Expand Down
8 changes: 4 additions & 4 deletions Source/plugins/plugins.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::IController -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::Controller -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand All @@ -169,7 +169,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::IController -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::Controller -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -190,7 +190,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::IController -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::Controller -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -215,7 +215,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::IController -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
<Command>python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" --no-includes --keep-empty -c --namespace WPEFramework::Exchange::Controller -o "$(ProjectDir)generated\json" "$(ProjectDir)IController.h" --force</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
13 changes: 9 additions & 4 deletions Source/plugins/proxystubs.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="generated\ProxyStubs_Controller.cpp" />
<ClCompile Include="generated\ProxyStubs_ControllerDeprecated.cpp" />
<ClCompile Include="generated\ProxyStubs_Plugin.cpp" />
<ClCompile Include="generated\ProxyStubs_Shell.cpp" />
<ClCompile Include="generated\ProxyStubs_StateControl.cpp" />
Expand Down Expand Up @@ -116,6 +117,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>.;$(FrameworkPath);$(WindowsPath);$(WindowsPath)zlib</AdditionalIncludeDirectories>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<AdditionalOptions>/wd4996 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -126,7 +128,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IControllerDeprecated.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Message>
</Message>
</PreBuildEvent>
Expand All @@ -141,6 +143,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>.;$(FrameworkPath);$(WindowsPath);$(WindowsPath)zlib</AdditionalIncludeDirectories>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<AdditionalOptions>/wd4996 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -149,7 +152,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IControllerDeprecated.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Message>
</Message>
</PreBuildEvent>
Expand All @@ -164,6 +167,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>.;$(FrameworkPath);$(WindowsPath);$(WindowsPath)zlib</AdditionalIncludeDirectories>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<AdditionalOptions>/wd4996 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -172,7 +176,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IControllerDeprecated.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Message>
</Message>
</PreBuildEvent>
Expand All @@ -189,6 +193,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>.;$(FrameworkPath);$(WindowsPath);$(WindowsPath)zlib</AdditionalIncludeDirectories>
<UseStandardPreprocessor>true</UseStandardPreprocessor>
<AdditionalOptions>/wd4996 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -199,7 +204,7 @@
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
<PreBuildEvent>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Command>python "$(ToolPath)\ProxyStubGenerator\StubGenerator.py" --namespace WPEFramework::PluginHost --outdir "$(ProjectDir)generated" "$(ProjectDir)IPlugin.h" "$(ProjectDir)IShell.h" "$(ProjectDir)IControllerDeprecated.h" "$(ProjectDir)IController.h" "$(ProjectDir)IStateControl.h" "$(ProjectDir)ISubSystem.h" "$(ProjectDir)IDispatcher.h" -I "$(ProjectDir)\.."</Command>
<Message>
</Message>
</PreBuildEvent>
Expand Down
3 changes: 3 additions & 0 deletions Source/plugins/proxystubs.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<ClCompile Include="generated\ProxyStubs_SubSystem.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="generated\ProxyStubs_ControllerDeprecated.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Generated Files">
Expand Down

0 comments on commit 4cace77

Please sign in to comment.