1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
/*
* Copyright 1999-2021 Logitech, Inc.
* All Rights Reserved
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#pragma once
#include "fu-logitech-bulkcontroller-device.h"
#include "usb_msg.pb-c.h"
#define SET_TIME_DELAY_MS 500 /* send future time to keep PC & device time as close as possible */
typedef enum {
kProtoId_UnknownId,
kProtoId_GetDeviceInfoResponse,
kProtoId_TransitionToDeviceModeResponse,
kProtoId_Ack,
kProtoId_KongEvent,
kProtoId_HandshakeEvent,
kProtoId_CrashDumpAvailableEvent
} FuLogitechBulkcontrollerProtoId;
GByteArray *
fu_logitech_bulkcontroller_proto_manager_generate_get_device_info_request(
FuLogitechBulkcontrollerDevice *self) G_GNUC_NON_NULL(1);
GByteArray *
fu_logitech_bulkcontroller_proto_manager_generate_transition_to_device_mode_request(
FuLogitechBulkcontrollerDevice *self) G_GNUC_NON_NULL(1);
GByteArray *
fu_logitech_bulkcontroller_proto_manager_generate_set_device_time_request(
FuLogitechBulkcontrollerDevice *self,
GError **error) G_GNUC_NON_NULL(1);
GByteArray *
fu_logitech_bulkcontroller_proto_manager_decode_message(const guint8 *data,
guint32 len,
FuLogitechBulkcontrollerProtoId *proto_id,
GError **error) G_GNUC_NON_NULL(1, 3);
|