Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDeviceIdentification] Update with JSON-RPC interface #408

Merged
merged 9 commits into from
Jan 30, 2025
18 changes: 14 additions & 4 deletions definitions/Definitions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_Cobalt.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Compositor.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Containers.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_DeviceIdentification.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_DeviceInfo.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_DHCPServer.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_DIALServer.cpp" />
Expand Down Expand Up @@ -80,6 +79,20 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --case-convention legacy --keep-empty -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --case-convention legacy --keep-empty -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
</CustomBuild>
<CustomBuild Include="..\interfaces\IDeviceIdentification.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JDeviceIdentification.h</Outputs>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ClInclude</OutputItemType>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)../interfaces/json/JDeviceIdentification.h</Outputs>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ClInclude</OutputItemType>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JDeviceIdentification.h</Outputs>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ClInclude</OutputItemType>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JDeviceIdentification.h</Outputs>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ClInclude</OutputItemType>
</CustomBuild>
<ClInclude Include="ValuePoint.h" />
<CustomBuild Include="..\interfaces\IMath.h">
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JMath.h</Outputs>
Expand Down Expand Up @@ -241,9 +254,6 @@
<CustomBuild Include="..\jsonrpc\Containers.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\DeviceIdentification.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\DeviceInfo.json">
<FileType>Document</FileType>
</CustomBuild>
Expand Down
38 changes: 4 additions & 34 deletions definitions/Definitions.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_NetworkControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_BluetoothControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_BluetoothRemoteControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_Browser.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -60,9 +54,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_Containers.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_DeviceIdentification.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_DeviceInfo.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand All @@ -75,9 +66,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_Dictionary.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_DisplayInfo.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_DTV.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand All @@ -90,9 +78,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_IOConnector.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_IOControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_LocationSync.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand All @@ -117,9 +102,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_PerformanceMonitor.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_PlayerInfo.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_Power.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand All @@ -138,9 +120,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_SecurityAgent.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_Spark.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_StateControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand All @@ -159,9 +138,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_TimeZone.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_TraceControl.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_ValuePoint.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -195,12 +171,6 @@
</None>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\jsonrpc\BluetoothControl.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\BluetoothRemoteControl.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\Browser.json">
<Filter>Contracts</Filter>
</CustomBuild>
Expand All @@ -216,9 +186,6 @@
<CustomBuild Include="..\jsonrpc\Containers.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\DeviceIdentification.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\DeviceInfo.json">
<Filter>Contracts</Filter>
</CustomBuild>
Expand Down Expand Up @@ -321,5 +288,8 @@
<CustomBuild Include="..\interfaces\IMessenger.h">
<Filter>Interfaces</Filter>
</CustomBuild>
<CustomBuild Include="..\interfaces\IDeviceIdentification.h">
<Filter>Interfaces</Filter>
</CustomBuild>
</ItemGroup>
</Project>
</Project>
49 changes: 49 additions & 0 deletions interfaces/IDeviceIdentification.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2024 Metrological
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include "Module.h"

namespace Thunder {

namespace Exchange {

// @json 1.0.0 @uncompliant:collapsed @text:legacy_lowercase
struct EXTERNAL IDeviceIdentification : virtual public Core::IUnknown {

enum { ID = ID_DEVICEIDENTIFICATION };

struct DeviceInfo {
string deviceID /* @brief Device ID (e.g. WPEuCfrLF45) */;
Core::OptionalType<string> firmwareVersion /* @brief Version of the device firmware (e.g. 1.0.0) */;
Core::OptionalType<string> chipset /* @brief Chipset used for this device (e.g. BCM2711) */;
};

// @property
// @text deviceidentification
// @brief Get device paltform specific information
// @retval ERROR_UNAVAILABLE Identification not availbale
virtual Core::hresult Identification(DeviceInfo& info /* @out */) const = 0;

};

} // namespace Exchange

}
2 changes: 2 additions & 0 deletions interfaces/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ namespace Exchange {

ID_SYSTEMAUDIOPLAYER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x520,
ID_SYSTEMAUDIOPLAYER_NOTIFICATION = ID_SYSTEMAUDIOPLAYER + 1,

ID_DEVICEIDENTIFICATION = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x530,
};
}
}
1 change: 1 addition & 0 deletions interfaces/Interfaces.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<ClInclude Include="IConfiguration.h" />
<ClInclude Include="IContentDecryption.h" />
<ClInclude Include="ICryptography.h" />
<ClInclude Include="IDeviceIdentification.h" />
<ClInclude Include="IDeviceInfo.h" />
<ClInclude Include="IDIALServer.h" />
<ClInclude Include="IDictionary.h" />
Expand Down
3 changes: 3 additions & 0 deletions interfaces/Interfaces.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@
<ClInclude Include="IZigWave.h">
<Filter>Interface Files</Filter>
</ClInclude>
<ClInclude Include="IDeviceIdentification.h">
<Filter>Interface Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />
Expand Down
41 changes: 0 additions & 41 deletions jsonrpc/DeviceIdentification.json

This file was deleted.

Loading