
#include <binder/Parcel.h>
#include <BpMyBinder.h>

namespace android {

    bool BpMyBinder::loadBomb(const int num) {
        Parcel data, reply;
        data.writeInterfaceToken(IMyBinder::getInterfaceDescriptor());
        data.writeInt32(num);
        remote()->transact(LOAD_BOMB_TRANSACTION, data, &reply);
        return reply.readInt32();
    }

    int BpMyBinder::checkBomb(void) {
        Parcel data, reply;
        data.writeInterfaceToken(IMyBinder::getInterfaceDescriptor());
        remote()->transact(CHECK_BOMB_TRANSACTION, data, &reply);
        return reply.readInt32();
    }

    bool BpMyBinder::fire(void) {
        Parcel data, reply;
        data.writeInterfaceToken(IMyBinder::getInterfaceDescriptor());
        remote()->transact(FIRE_TRANSACTION, data, &reply);
        return reply.readInt32();
    }
}

