Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion apis/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ namespace Exchange {
ID_MIRACAST_SERVICE_NOTIFICATION = ID_MIRACAST_SERVICE + 1,
ID_MIRACAST_PLAYER = ID_MIRACAST_SERVICE + 2,
ID_MIRACAST_PLAYER_NOTIFICATION = ID_MIRACAST_SERVICE + 3,
ID_MIRACAST_PLAYER_ENV_ARGUMENTS_ITERATOR = ID_MIRACAST_SERVICE + 4
ID_MIRACAST_PLAYER_ENV_ARGUMENTS_ITERATOR = ID_MIRACAST_SERVICE + 4,

ID_PREINSTALL_MANAGER = ID_ENTOS_OFFSET + 0x3E0,
ID_PREINSTALL_MANAGER_NOTIFICATION = ID_PREINSTALL_MANAGER + 1,
ID_PREINSTALL_MANAGER_INSTALL_INFO_ITERATOR = ID_PREINSTALL_MANAGER + 2,
};
}
}
111 changes: 111 additions & 0 deletions apis/PreinstallManager/IPreinstallManager.h
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

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'apis/PreinstallManager/IPreinstallManager.h' (Match: peridyno/peridyno/0.4.0, 15 lines, url: https://github.com/peridyno/peridyno/archive/refs/tags/v0.4.0.tar.gz, file: src/Framework/Module/Pipeline.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?
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 */,
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) {};
};

/** 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
Loading