-
Notifications
You must be signed in to change notification settings - Fork 14
RDKEMW-6787: [AI2.0] Create IPreInstallerManager interface #456
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
Open
sajilal711
wants to merge
2
commits into
develop
Choose a base branch
from
feature/RDKEMW-6787
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+63
−1
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* If not stated otherwise in this file or this component's LICENSE file the | ||
* following copyright and licenses apply: | ||
* | ||
* Copyright 2025 RDK Management | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
Check failure on line 7 in apis/PreinstallManager/IPreinstallManager.h
|
||
* 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" | ||
|
||
// @stubgen:include <com/IIteratorType.h> | ||
|
||
namespace WPEFramework { | ||
namespace Exchange { | ||
|
||
#ifndef RUNTIME_CONFIG | ||
struct RuntimeConfig { | ||
bool dial; | ||
bool wanLanAccess; | ||
bool thunder; | ||
int32_t systemMemoryLimit; | ||
int32_t gpuMemoryLimit; | ||
std::string envVariables; | ||
uint32_t userId; | ||
uint32_t groupId; | ||
uint32_t dataImageSize; | ||
|
||
bool resourceManagerClientEnabled; | ||
std::string dialId; | ||
std::string command; | ||
std::string appType; | ||
std::string appPath; | ||
std::string runtimePath; | ||
|
||
std::string logFilePath; | ||
uint32_t logFileMaxSize; | ||
std::string logLevels; //json array of strings | ||
bool mapi; | ||
std::string fkpsFiles; //json array of strings | ||
|
||
std::string fireboltVersion; | ||
bool enableDebugger; | ||
}; | ||
#define RUNTIME_CONFIG | ||
#endif | ||
|
||
// @json 1.0.0 @text:keep | ||
struct EXTERNAL IPreinstallManager : virtual public Core::IUnknown { | ||
enum { ID = ID_PREINSTALL_MANAGER }; | ||
|
||
enum PreinstallState : uint8_t { | ||
PREINSTALL_STATE_UNKNOWN = 0 /* @text PREINSTALL_STATE_UNKNOWN */, //required? | ||
sajilal711 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
PREINSTALL_STATE_INSTALLED = 1 /* @text PREINSTALL_STATE_INSTALLED */, | ||
PREINSTALL_STATE_INSTALL_FAILURE = 2 /* @text PREINSTALL_STATE_INSTALL_FAILURE */ | ||
}; | ||
|
||
enum PreinstallFailReason : uint8_t { | ||
PREINSTALL_FAIL_REASON_NONE = 0 /* @text PREINSTALL_FAIL_REASON_NONE */, | ||
sajilal711 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
PREINSTALL_FAIL_REASON_UNKNOWN = 1 /* @text PREINSTALL_FAIL_REASON_UNKNOWN */, | ||
PREINSTALL_FAIL_REASON_SIGNATURE_VERIFICATION_FAILURE = 2 /* @text PREINSTALL_FAIL_REASON_SIGNATURE_VERIFICATION_FAILURE */, | ||
PREINSTALL_FAIL_REASON_PERSISTENCE_FAILURE = 3 /* @text PREINSTALL_FAIL_REASON_PERSISTENCE_FAILURE */ | ||
}; | ||
|
||
|
||
struct AppInstallInfo { | ||
string packageId; | ||
string version; | ||
PreinstallState state; | ||
PreinstallFailReason failReason; | ||
}; | ||
|
||
|
||
// using IAppInstallInfoIterator = RPC::IIteratorType<AppInstallInfo, ID_PREINSTALL_MANAGER_INSTALL_INFO_ITERATOR>; | ||
|
||
// @event | ||
struct EXTERNAL INotification : virtual public Core::IUnknown { | ||
enum { ID = ID_PREINSTALL_MANAGER_NOTIFICATION }; | ||
|
||
|
||
// @text onAppInstallationStatus | ||
// @brief Emitted when the installation of a preinstalled app succeeds or fails. | ||
// @param appInstallInfoArray: Output installation status details as string object | ||
virtual void OnAppInstallationStatus(const string& jsonresponse) {}; | ||
sajilal711 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
/** Register notification interface */ | ||
virtual Core::hresult Register(INotification *notification) = 0; | ||
/** Unregister notification interface */ | ||
virtual Core::hresult Unregister(INotification *notification) = 0; | ||
|
||
// @text startPreinstall | ||
// @brief Checks the preinstall directory for packages to be preinstalled and installs them as needed. | ||
// @param[in] forceInstall: If true always install the app; if false then install only if not installed or existing is older version | ||
// @return Core::ERROR_NONE on success, Core::ERROR_GENERAL on error. | ||
virtual Core::hresult StartPreinstall(bool forceInstall) = 0; | ||
}; | ||
} // namespace Exchange | ||
} // namespace WPEFramework |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.