Send policy query message

Send policy query message to A1-mediator to get policy instance list.

Change-Id: Ib11aa4ab49c266a1def7c4171b743e841fda21d3
Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
diff --git a/hwApp.go b/hwApp.go
index 2f82210..dc4e4f7 100755
--- a/hwApp.go
+++ b/hwApp.go
@@ -27,6 +27,29 @@
 type HWApp struct {
 }
 
+var (
+	A1_POLICY_QUERY      = 20013
+	POLICY_QUERY_PAYLOAD = "{\"policy_type_id\":20000}"
+)
+
+func (e *HWApp) sendPolicyQuery() {
+	xapp.Logger.Info("Invoked method to send  policy query message")
+
+	// prepare and send policy query message over RMR
+	rmrParams := new(xapp.RMRParams)
+	rmrParams.Mtype = A1_POLICY_QUERY // A1_POLICY_QUERY
+	rmrParams.Payload = []byte(POLICY_QUERY_PAYLOAD)
+
+	// send rmr message
+	flg := xapp.Rmr.SendMsg(rmrParams)
+
+	if flg {
+		xapp.Logger.Info("Successfully sent policy query message over RMR")
+	} else {
+		xapp.Logger.Info("Failed to send policy query message over RMR")
+	}
+}
+
 func (e *HWApp) ConfigChangeHandler(f string) {
 	xapp.Logger.Info("Config file changed")
 }