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

[IPackager] Update with JSON-RPC interface #412

Merged
merged 8 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions definitions/Definitions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_Netflix.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_NetworkControl.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_OCDM.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Packager.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_PerformanceMonitor.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Power.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Provisioning.cpp" />
Expand Down Expand Up @@ -324,9 +323,6 @@
<CustomBuild Include="..\jsonrpc\OCDM.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\Packager.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\PerformanceMonitor.json">
<FileType>Document</FileType>
</CustomBuild>
Expand Down
6 changes: 0 additions & 6 deletions definitions/Definitions.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_OCDM.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_Packager.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_PerformanceMonitor.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -213,9 +210,6 @@
<CustomBuild Include="..\jsonrpc\OCDM.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\Packager.json">
<Filter>Contracts</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\PerformanceMonitor.json">
<Filter>Contracts</Filter>
</CustomBuild>
Expand Down
22 changes: 19 additions & 3 deletions interfaces/IPackager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
namespace Thunder {
namespace Exchange {

// @json 1.0.0 @text:legacy_lowercase
struct EXTERNAL IPackager : virtual public Core::IUnknown {
enum { ID = ID_PACKAGER };

Expand All @@ -49,7 +50,7 @@ namespace Exchange {
enum { ID = ID_PACKAGER_INSTALLATIONINFO };
virtual state State() const = 0;
virtual uint8_t Progress() const = 0;
virtual string AppName() const = 0;
virtual string AppName() const = 0;
virtual uint32_t ErrorCode() const = 0;
virtual uint32_t Abort() = 0;
};
Expand All @@ -67,10 +68,25 @@ namespace Exchange {
virtual void RepositorySynchronize(uint32_t status) = 0;
};

// @json:omit
virtual void Register(INotification* observer) = 0;
// @json:omit
virtual void Unregister(const INotification* observer) = 0;
virtual uint32_t Configure(PluginHost::IShell* service) = 0;
virtual uint32_t Install(const string& name, const string& version, const string& arch) = 0;
// @json:omit
DEPRECATED virtual uint32_t Configure(PluginHost::IShell* service) = 0;

// @brief Install a package given by a name, an URL or a file path
// @param name: Name, URL or file path of the package to install (e.g. thunder-plugin-netflix)
// @param version: Version of the package to install (e.g. 1.0)
// @param arch: Architecture of the package to install (e.g. arm)
// @retval ERROR_INPROGRESS Other installation/synchronization is already in progress
// @retval ERROR_GENERAL Opkg package manager not initialized successfully
virtual uint32_t Install(const string& name, const string& version /* @opptional */, const string& arch /* @opptional */) = 0;

// @brief Synchronize repository manifest with a repository
// @alt::deprecated synchronize
// @retval ERROR_INPROGRESS Other installation/synchronization is already in progress
// @retval ERROR_GENERAL Opkg package manager not initialized successfully
virtual uint32_t SynchronizeRepository() = 0;
};
}
Expand Down
62 changes: 0 additions & 62 deletions jsonrpc/Packager.json

This file was deleted.