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

Side by Side Diff: webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h

Issue 2646863005: Fixing logic for using android_setsocknetwork() with bind(). (Closed)
Patch Set: comment formatting Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class AndroidNetworkMonitor : public rtc::NetworkMonitorBase, 51 class AndroidNetworkMonitor : public rtc::NetworkMonitorBase,
52 public rtc::NetworkBinderInterface { 52 public rtc::NetworkBinderInterface {
53 public: 53 public:
54 AndroidNetworkMonitor(); 54 AndroidNetworkMonitor();
55 55
56 static void SetAndroidContext(JNIEnv* jni, jobject context); 56 static void SetAndroidContext(JNIEnv* jni, jobject context);
57 57
58 void Start() override; 58 void Start() override;
59 void Stop() override; 59 void Stop() override;
60 60
61 int BindSocketToNetwork(int socket_fd, 61 rtc::NetworkBindingResult BindSocketToNetwork(
62 const rtc::IPAddress& address) override; 62 int socket_fd,
63 const rtc::IPAddress& address) override;
63 rtc::AdapterType GetAdapterType(const std::string& if_name) override; 64 rtc::AdapterType GetAdapterType(const std::string& if_name) override;
64 void OnNetworkConnected(const NetworkInformation& network_info); 65 void OnNetworkConnected(const NetworkInformation& network_info);
65 void OnNetworkDisconnected(NetworkHandle network_handle); 66 void OnNetworkDisconnected(NetworkHandle network_handle);
66 void SetNetworkInfos(const std::vector<NetworkInformation>& network_infos); 67 void SetNetworkInfos(const std::vector<NetworkInformation>& network_infos);
67 68
68 private: 69 private:
69 static jobject application_context_; 70 static jobject application_context_;
70 static int android_sdk_int_; 71 static int android_sdk_int_;
71 JNIEnv* jni() { return AttachCurrentThreadIfNeeded(); } 72 JNIEnv* jni() { return AttachCurrentThreadIfNeeded(); }
72 73
(...skipping 12 matching lines...) Expand all
85 class AndroidNetworkMonitorFactory : public rtc::NetworkMonitorFactory { 86 class AndroidNetworkMonitorFactory : public rtc::NetworkMonitorFactory {
86 public: 87 public:
87 AndroidNetworkMonitorFactory() {} 88 AndroidNetworkMonitorFactory() {}
88 89
89 rtc::NetworkMonitorInterface* CreateNetworkMonitor() override; 90 rtc::NetworkMonitorInterface* CreateNetworkMonitor() override;
90 }; 91 };
91 92
92 } // namespace webrtc_jni 93 } // namespace webrtc_jni
93 94
94 #endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDNETWORKMONITOR_JNI_H_ 95 #endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDNETWORKMONITOR_JNI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698