Erik Kline | e0cce21 | 2017-03-06 14:05:23 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.server.connectivity.tethering; |
| 18 | |
| 19 | import android.net.LinkProperties; |
| 20 | import android.os.Handler; |
| 21 | import android.util.Log; |
| 22 | |
| 23 | /** |
| 24 | * A wrapper around hardware offload interface. |
| 25 | * |
| 26 | * @hide |
| 27 | */ |
| 28 | public class OffloadController { |
| 29 | private static final String TAG = OffloadController.class.getSimpleName(); |
| 30 | |
| 31 | private final Handler mHandler; |
| 32 | private LinkProperties mUpstreamLinkProperties; |
| 33 | |
| 34 | public OffloadController(Handler h) { |
| 35 | mHandler = h; |
| 36 | } |
| 37 | |
| 38 | public void start() { |
| 39 | // TODO: initOffload() and configure callbacks to be handled on our |
| 40 | // preferred Handler. |
| 41 | Log.d(TAG, "tethering offload not supported"); |
| 42 | } |
| 43 | |
| 44 | public void stop() { |
| 45 | // TODO: stopOffload(). |
| 46 | mUpstreamLinkProperties = null; |
| 47 | } |
| 48 | |
| 49 | public void setUpstreamLinkProperties(LinkProperties lp) { |
| 50 | // TODO: setUpstreamParameters(). |
| 51 | mUpstreamLinkProperties = lp; |
| 52 | } |
| 53 | } |