sdm : Add support for dynamic BW limit management

Read if device need to support dynamic bandwidth limit and
provide framework for applying a new total bandwidth limit and
per pipe bandwidth limit based on application scenario. Also
provide an API to query the status of bandwidth limit transaction.

Change-Id: Iaf9676a45c8c0c0c4af00c81ce4f5d70759c02ba
diff --git a/libqservice/QServiceUtils.h b/libqservice/QServiceUtils.h
index 73b2b18..8f25253 100644
--- a/libqservice/QServiceUtils.h
+++ b/libqservice/QServiceUtils.h
@@ -83,4 +83,20 @@
     return sendSingleParam(qService::IQService::SET_CAMERA_STATUS, on);
 }
 
+inline bool displayBWTransactionPending() {
+    android::status_t err = (android::status_t) android::FAILED_TRANSACTION;
+    bool ret = false;
+    android::sp<qService::IQService> binder = getBinder();
+    android::Parcel inParcel, outParcel;
+    if(binder != NULL) {
+        err = binder->dispatch(qService::IQService::GET_BW_TRANSACTION_STATUS,
+                &inParcel , &outParcel);
+        if(err != android::NO_ERROR){
+          ALOGE("GET_BW_TRANSACTION_STATUS binder call failed err=%d", err);
+          return ret;
+        }
+    }
+    ret = outParcel.readInt32();
+    return ret;
+}
 #endif /* end of include guard: QSERVICEUTILS_H */