Index: remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeObserver.java |
diff --git a/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeObserver.java b/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeObserver.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0f4ca2a3e7840814f57ff24b3877435498515f93 |
--- /dev/null |
+++ b/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeObserver.java |
@@ -0,0 +1,34 @@ |
+// Copyright 2016 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. |
+ |
+package org.chromium.chromoting.host.jni; |
+ |
+/** Interface for receiving events from the C++ implementation of It2MeHost. */ |
+public interface It2MeObserver { |
Sergey Ulanov
2016/04/15 19:42:05
Call it It2MeHostObserver.
Lambros
2016/04/22 22:31:58
Done.
|
+ /** This corresponds to the C++ enumeration remoting::It2MeHostState. */ |
+ public enum State { |
+ DISCONNECTED, |
+ STARTING, |
+ REQUESTED_ACCESS_CODE, |
+ RECEIVED_ACCESS_CODE, |
+ CONNECTED, |
+ ERROR, |
+ INVALID_DOMAIN_ERROR; |
+ } |
+ |
+ /** |
+ * Called when a new It2Me access-code is received. |
+ * @param accessCode The access code for the It2Me session. |
+ * @param lifetimeSeconds Duration for which the access-code remains valid. |
+ */ |
+ void onStoreAccessCode(String accessCode, int lifetimeSeconds); |
Sergey Ulanov
2016/04/15 19:42:05
I don't think this is a good name for this method.
Lambros
2016/04/22 22:31:58
Done.
|
+ |
+ /** |
+ * Called when the state has changed. |
+ * @param state The new state. |
+ * @param errorMessage Used only for the ERROR state. The string is not localized and not |
+ * intended to be shown to a user. |
+ */ |
+ void onStateChanged(State state, String errorMessage); |
+} |