Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: remoting/android/host/src/org/chromium/chromoting/host/jni/It2MeObserver.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: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+}

Powered by Google App Engine
This is Rietveld 408576698