Chromium Code Reviews| Index: mojo/spy/public/spy.mojom |
| diff --git a/mojo/spy/public/spy.mojom b/mojo/spy/public/spy.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4bcc094f29be077d0150b5b35bf3717a99edad2 |
| --- /dev/null |
| +++ b/mojo/spy/public/spy.mojom |
| @@ -0,0 +1,50 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module mojo.spy_api { |
| + |
| +enum Result { |
| + ALL_OK, |
| + INTERNAL_ERROR, |
| + INVALID_ID, |
| + NO_MORE_IDS, |
| + INVALID_CALL, |
| + INVALID_PARAMS, |
| + BAD_STATE, |
| + RESOURCE_LIMIT |
| +}; |
| + |
| +struct Version { |
| + uint32 major; |
| + uint32 minor; |
| +}; |
| + |
| +enum ConnectionOptions { |
| + SKIP, |
| + PAUSE, |
| + RESUME, |
| + PEEK_MESSAGES |
| +}; |
| + |
| +struct Message { |
| + uint32 id; |
| + uint32 time; |
| + uint8[] data; |
| +}; |
| + |
| +[Client=SpyClient] |
| +interface SpyServer { |
| + StartSession(Version version) => (Result result, string name); |
| + StopSession() => (Result result); |
| + TrackConnection(uint32 id, ConnectionOptions options) => (Result result); |
| +}; |
| + |
| +interface SpyClient { |
| + FatalError(Result result); |
|
darin (slow to review)
2014/05/17 02:37:58
nit: should this be OnFatalError?
cpu_(ooo_6.6-7.5)
2014/05/19 20:09:34
Done.
|
| + OnSessionEnd(Result result); |
| + OnClientConnection(string name, uint32 id, ConnectionOptions options); |
| + OnMessage(Message message); |
| +}; |
| + |
| +} |