Android Open Source - BluetoothSppPro C Resource P V






From Project

Back to project page BluetoothSppPro.

License

The source code is released under:

Apache License

If you think the Android project BluetoothSppPro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mobi.dzs.android.bluetooth;
/*  ww  w  .j av a 2 s  . com*/
/**
 * PV???????????????
 * @version 1.0 2014-04-24
 * @author JerryLi (lijian@dzs.mobi)
 */
final public class CResourcePV {
  private int iCount=0;
  /** 
   * ??
   * @param iResourceCount int ???????
   */
  public CResourcePV(int iResourceCount){
    this.iCount = iResourceCount;
  }
  /**
   * ???????????
   * @return boolean
   */
  public boolean isExist(){
    synchronized(this){
      return iCount == 0;
    }
  }
  /**
   * ??????????
   * @return
   */
  public boolean seizeRes(){
    synchronized(this){
      if (this.iCount > 0){
        iCount--;
        return true;
      }else
        return false;
    }
  }
  /**
   * ????????
   * @return
   */
  public void revert(){
    synchronized(this){
      iCount++;
    }
  }
}




Java Source Code List

mobi.dzs.android.BLE_SPP_PRO.BaseActivity.java
mobi.dzs.android.BLE_SPP_PRO.BaseCommActivity.java
mobi.dzs.android.BLE_SPP_PRO.actAbout.java
mobi.dzs.android.BLE_SPP_PRO.actByteStream.java
mobi.dzs.android.BLE_SPP_PRO.actCmdLine.java
mobi.dzs.android.BLE_SPP_PRO.actDiscovery.java
mobi.dzs.android.BLE_SPP_PRO.actKeyBoard.java
mobi.dzs.android.BLE_SPP_PRO.actMain.java
mobi.dzs.android.BLE_SPP_PRO.globalPool.java
mobi.dzs.android.bluetooth.BTSerialComm.java
mobi.dzs.android.bluetooth.BluetoothCtrl.java
mobi.dzs.android.bluetooth.BluetoothSppClient.java
mobi.dzs.android.bluetooth.CResourcePV.java
mobi.dzs.android.control.button.ButtonPassListener.java
mobi.dzs.android.control.button.RepeatingButton.java
mobi.dzs.android.storage.CJsonStorage.java
mobi.dzs.android.storage.CKVStorage.java
mobi.dzs.android.storage.CSharedPreferences.java
mobi.dzs.android.util.CHexConver.java
mobi.dzs.android.util.LocalIOTools.java