Chromium Code Reviews

Unified Diff: remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeHostObserver.java

Issue 1884253003: [remoting android] Plumb It2Me events from C++ to Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@android-host-it2me-connect
Patch Set: Address comments, git cl format Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeHostObserver.java
diff --git a/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeHostObserver.java b/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeHostObserver.java
new file mode 100644
index 0000000000000000000000000000000000000000..50605ee194e3f01a11819e022663a8ac4ac9ae41
--- /dev/null
+++ b/remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeHostObserver.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 It2MeHostObserver {
+ /** 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 onAccessCodeReceived(String accessCode, int lifetimeSeconds);
+
+ /**
+ * 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);
+}
« no previous file with comments | « remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java ('k') | remoting/host/android/jni_host.h » ('j') | no next file with comments »

Powered by Google App Engine