chromium/remoting/host/linux/remote_desktop_portal_injector.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/linux/remote_desktop_portal_injector.h"

#include <gio/gio.h>
#include <gio/gunixfdlist.h>
#include <glib-object.h>
#include <linux/input.h>
#include <poll.h>

#include <utility>

#include "base/check.h"
#include "base/notreached.h"
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "remoting/base/logging.h"
#include "third_party/libei/cipd/include/libei.h"
#include "third_party/webrtc/modules/portal/portal_request_response.h"
#include "third_party/webrtc/modules/portal/scoped_glib.h"
#include "third_party/webrtc/modules/portal/xdg_desktop_portal_utils.h"

namespace remoting::xdg_portal {

Scoped;

namespace {
// TODO(crbug.com/40212673): See if these can be pulled from a common place.
constexpr int BUTTON_LEFT_KEYCODE =;
constexpr int BUTTON_RIGHT_KEYCODE =;
constexpr int BUTTON_MIDDLE_KEYCODE =;
constexpr int BUTTON_FORWARD_KEYCODE =;
constexpr int BUTTON_BACK_KEYCODE =;
constexpr int BTN_UNKNOWN =;

// See:
// https://libinput.pages.freedesktop.org/libei/api/group__libei.html#gaf2ec4b04f6b3c706bad0f1cae66bea34
constexpr int EI_SCROLL_FACTOR =;

int EvdevCodeToMouseButton(int code) {}

}  // namespace

RemoteDesktopPortalInjector::RemoteDesktopPortalInjector() {}

RemoteDesktopPortalInjector::~RemoteDesktopPortalInjector() {}

void RemoteDesktopPortalInjector::Shutdown() {}

// static
void RemoteDesktopPortalInjector::ValidateGDPBusProxyResult(
    GObject* proxy,
    GAsyncResult* result,
    gpointer user_data) {}

void RemoteDesktopPortalInjector::InjectMouseButton(int code, bool pressed) {}

void RemoteDesktopPortalInjector::InjectMouseScroll(int axis, int steps) {}

void RemoteDesktopPortalInjector::MovePointerBy(int delta_x, int delta_y) {}

bool RemoteDesktopPortalInjector::InDeviceRegion(uint32_t x, uint32_t y) {}

void RemoteDesktopPortalInjector::MovePointerTo(int x, int y) {}

void RemoteDesktopPortalInjector::InjectKeyPress(int code,
                                                 bool pressed,
                                                 bool is_code) {}

void RemoteDesktopPortalInjector::SetSessionDetails(
    webrtc::xdg_portal::SessionDetails session_details) {}

static void ei_loghandler(struct ei* ei,
                          enum ei_log_priority priority,
                          const char* message,
                          struct ei_log_context* ctx) {}

// static
void RemoteDesktopPortalInjector::OnEiFdRequested(GObject* object,
                                                  GAsyncResult* result,
                                                  gpointer user_data) {}

void RemoteDesktopPortalInjector::HandleRegions(struct ei_device* device) {}

void RemoteDesktopPortalInjector::OnEiSeatAddedEvent(struct ei_event* event) {}

void RemoteDesktopPortalInjector::OnEiSeatRemovedEvent(struct ei_event* event) {}

void RemoteDesktopPortalInjector::OnEiDeviceAddedEvent(struct ei_event* event) {}

void RemoteDesktopPortalInjector::OnEiDeviceResumedEvent(
    struct ei_event* event) {}

void RemoteDesktopPortalInjector::OnEiDevicePausedEvent(
    struct ei_event* event) {}

void RemoteDesktopPortalInjector::OnEiDeviceRemovedEvent(
    struct ei_event* event) {}

void RemoteDesktopPortalInjector::HandleEiEvent(struct ei_event* event) {}

void RemoteDesktopPortalInjector::SetupLibei(
    base::OnceCallback<void(bool)> OnLibeiDone) {}

}  // namespace remoting::xdg_portal