blob: 2e58668bd1bb431d99ff1c1527b90d69af233af3 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.telephony.snoop;
using zx;
enum Direction {
FROM_MODEM = 1;
TO_MODEM = 2;
};
struct QmiMessage {
zx.time timestamp;
Direction direction;
bool is_partial_copy;
array<uint8>:256 opaque_bytes;
};
//TODO(jiamingw): change it to xunion after transport driver is converted to LLCPP
union Message {
1: QmiMessage qmi_message;
};
/// Protocol for forwarding messages to Snooper.
protocol Publisher {
SendMessage(Message msg);
};
/// Protocol for forwarding Message from Snooper.
[Discoverable]
protocol Snooper {
/// Get number of devices that connect to Snooper.
GetDeviceNum() -> (uint32 device_num);
/// Snoop message which receives by Snooper client.
-> OnMessage(Message msg);
};