diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-04-11 15:53:27 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2014-05-13 21:21:49 -0700 |
commit | e049c23980409be6576da3d30538a6cdc43854dd (patch) | |
tree | e4b53acc4aaf643704d8b6186f5bf72bc5a200a2 /core/java/android/net/ConnectivityServiceProtocol.java | |
parent | 0191c33539daf580a20db87d2d8a1aee648275d9 (diff) | |
download | frameworks_base-e049c23980409be6576da3d30538a6cdc43854dd.zip frameworks_base-e049c23980409be6576da3d30538a6cdc43854dd.tar.gz frameworks_base-e049c23980409be6576da3d30538a6cdc43854dd.tar.bz2 |
Add NetworkFactory support.
This is a protocol allowing transports to dynamically register with CS for
Handler to Handler communications.
bug:13885501
Change-Id: Ic7275e3724a15efc7e5f80981560c4cb3106007b
Diffstat (limited to 'core/java/android/net/ConnectivityServiceProtocol.java')
-rw-r--r-- | core/java/android/net/ConnectivityServiceProtocol.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/core/java/android/net/ConnectivityServiceProtocol.java b/core/java/android/net/ConnectivityServiceProtocol.java new file mode 100644 index 0000000..34ba645 --- /dev/null +++ b/core/java/android/net/ConnectivityServiceProtocol.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net; + +import static com.android.internal.util.Protocol.BASE_CONNECTIVITY_SERVICE; + +/** + * Describes the Internal protocols used to communicate with ConnectivityService. + * @hide + */ +public class ConnectivityServiceProtocol { + private ConnectivityServiceProtocol() {} + + private static final int BASE = BASE_CONNECTIVITY_SERVICE; + + public static class NetworkFactoryProtocol { + private NetworkFactoryProtocol() {} + /** + * Pass a network request to the transport + * msg.obj = NetworkRequest + */ + public static final int CMD_REQUEST_NETWORK = BASE; + + /** + * Cancel a network request + * msg.obj = NetworkRequest + */ + public static final int CMD_CANCEL_REQUEST = BASE + 1; + } + + public static class NetworkAgentProtocol { + private NetworkAgentProtocol() {} + } +} |