Skip to content

Commit

Permalink
dnfdaemon: Register repo_key_import_request on Base interface
Browse files Browse the repository at this point in the history
  • Loading branch information
m-blaha committed Mar 8, 2024
1 parent d02d405 commit f2b1281
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
20 changes: 20 additions & 0 deletions dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.Base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
<arg name="message" type="s" />
</signal>

<!--
repo_key_import_request:
@session_object_path: object path of the dnf5daemon session
@key_id: PGP key id
@user_ids: User id
@key_fingerprint: Fingerprint of the PGP key
@key_url: URL of the PGP key
@timestamp: timestamp when the key was created
Request for repository key import confirmation.
-->
<signal name="repo_key_import_request">
<arg name="session_object_path" type="o" />
<arg name="key_id" type="s" />
<arg name="user_ids" type="as" />
<arg name="key_fingerprint" type="s" />
<arg name="key_url" type="s" />
<arg name="timestamp" type="x" />
</signal>

</interface>

</node>
20 changes: 0 additions & 20 deletions dnf5daemon-server/dbus/interfaces/org.rpm.dnf.v0.rpm.Repo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,6 @@ along with libdnf. If not, see <https://www.gnu.org/licenses/>.
<arg name="repo_ids" type="as" direction="in"/>
</method>

<!--
repo_key_import_request:
@session_object_path: object path of the dnf5daemon session
@key_id: PGP key id
@user_ids: User id
@key_fingerprint: Fingerprint of the PGP key
@key_url: URL of the PGP key
@timestamp: timestamp when the key was created
Request for repository key import confirmation.
-->
<signal name="repo_key_import_request">
<arg name="session_object_path" type="o" />
<arg name="key_id" type="s" />
<arg name="user_ids" type="as" />
<arg name="key_fingerprint" type="s" />
<arg name="key_url" type="s" />
<arg name="timestamp" type="x" />
</signal>

</interface>

</node>
5 changes: 5 additions & 0 deletions dnf5daemon-server/services/base/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ void Base::dbus_register() {
dnfdaemon::SIGNAL_DOWNLOAD_MIRROR_FAILURE,
"ossss",
{"session_object_path", "download_id", "message", "url", "metadata"});
dbus_object->registerSignal(
dnfdaemon::INTERFACE_BASE,
dnfdaemon::SIGNAL_REPO_KEY_IMPORT_REQUEST,
"osasssx",
{"session_object_path", "key_id", "user_ids", "key_fingerprint", "key_url", "timestamp"});
}

sdbus::MethodReply Base::read_all_repos(sdbus::MethodCall & call) {
Expand Down
6 changes: 0 additions & 6 deletions dnf5daemon-server/services/repo/repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ void Repo::dbus_register() {
dnfdaemon::INTERFACE_REPO, "disable", "as", {"repo_ids"}, "", {}, [this](sdbus::MethodCall call) -> void {
session.get_threads_manager().handle_method(*this, &Repo::disable, call, session.session_locale);
});

dbus_object->registerSignal(
dnfdaemon::INTERFACE_REPO,
dnfdaemon::SIGNAL_REPO_KEY_IMPORT_REQUEST,
"osasssx",
{"session_object_path", "key_id", "user_ids", "key_fingerprint", "key_url", "timestamp"});
}

sdbus::MethodReply Repo::confirm_key(sdbus::MethodCall & call) {
Expand Down

0 comments on commit f2b1281

Please sign in to comment.