summaryrefslogtreecommitdiff
path: root/src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java')
-rw-r--r--src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java b/src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java
deleted file mode 100644
index 60f5244..0000000
--- a/src/android/bluetooth/client/pbap/BluetoothPbapRequestSetPath.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.bluetooth.client.pbap;
-
-import android.util.Log;
-
-import java.io.IOException;
-
-import javax.obex.ClientSession;
-import javax.obex.HeaderSet;
-import javax.obex.ResponseCodes;
-
-final class BluetoothPbapRequestSetPath extends BluetoothPbapRequest {
-
- private final static String TAG = "BluetoothPbapRequestSetPath";
-
- private enum SetPathDir {
- ROOT, UP, DOWN
- };
-
- private SetPathDir mDir;
-
- public BluetoothPbapRequestSetPath(String name) {
- mDir = SetPathDir.DOWN;
- mHeaderSet.setHeader(HeaderSet.NAME, name);
- }
-
- public BluetoothPbapRequestSetPath(boolean goUp) {
- mHeaderSet.setEmptyNameHeader();
- if (goUp) {
- mDir = SetPathDir.UP;
- } else {
- mDir = SetPathDir.ROOT;
- }
- }
-
- @Override
- public void execute(ClientSession session) {
- Log.v(TAG, "execute");
-
- HeaderSet hs = null;
-
- try {
- switch (mDir) {
- case ROOT:
- case DOWN:
- hs = session.setPath(mHeaderSet, false, false);
- break;
- case UP:
- hs = session.setPath(mHeaderSet, true, false);
- break;
- }
-
- mResponseCode = hs.getResponseCode();
- } catch (IOException e) {
- mResponseCode = ResponseCodes.OBEX_HTTP_INTERNAL_ERROR;
- }
- }
-}