FileDocCategorySizeDatePackage
BluetoothPbapRequestSetPath.javaAPI DocAndroid 5.1 API2030Thu Mar 12 22:22:50 GMT 2015android.bluetooth.client.pbap

BluetoothPbapRequestSetPath

public final class BluetoothPbapRequestSetPath extends BluetoothPbapRequest

Fields Summary
private static final String
TAG
private SetPathDir
mDir
Constructors Summary
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;
        }
    
Methods Summary
public voidexecute(javax.obex.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;
        }