blob: 63b03c709c1a6daba564cdc9087bdbdf7222d8b0 [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;
type Direction = strict enum {
FROM_MODEM = 1;
TO_MODEM = 2;
};
type QmiMessage = struct {
timestamp zx.time;
direction Direction;
is_partial_copy bool;
opaque_bytes array<uint8, 256>;
};
//TODO(jiamingw): change it to xunion after transport driver is converted to LLCPP
type Message = strict union {
1: qmi_message QmiMessage;
};
/// Protocol for forwarding messages to Snooper.
protocol Publisher {
SendMessage(struct {
msg Message;
});
};
/// Protocol for forwarding Message from Snooper.
@discoverable
protocol Snooper {
/// Get number of devices that connect to Snooper.
GetDeviceNum() -> (struct {
device_num uint32;
});
/// Snoop message which receives by Snooper client.
-> OnMessage(struct {
msg Message;
});
};