
#include <sys/types.h>
#include <unistd.h>
#include <grp.h>

#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <utils/Log.h>
#include <utils/RefBase.h>

#include <MyBinder.h>

using namespace android;

//namespace android {

static int restBomb = 0;

bool MyBinder::loadBomb(const int num) {
    restBomb+=num;
    return true;
}

int MyBinder::checkBomb(void) {
    return restBomb;
}

bool MyBinder::fire(void) {
    if(0 < restBomb) {
        restBomb--;
        return true;
    } else {
        return false;
    }
}

//}



