qthighway/xqserviceutil/src/xqrequestinfo.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 24 9d760f716ca8
--- a/qthighway/xqserviceutil/src/xqrequestinfo.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qthighway/xqserviceutil/src/xqrequestinfo.cpp	Mon May 03 13:18:40 2010 +0300
@@ -57,6 +57,18 @@
     return info(XQServiceUtils::OptBackground).toBool();
 }
 
+void XQRequestInfo::setForeground(bool on)
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::setForeground %d", on);
+    setInfo(XQServiceUtils::OptForeground, on);
+}
+
+bool XQRequestInfo::isForeground() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::isForeground");
+    return info(XQServiceUtils::OptForeground).toBool();
+}
+
 
 bool XQRequestInfo::isSynchronous() const
 {
@@ -128,6 +140,19 @@
     return mInfo.keys();
 }
 
+int XQRequestInfo::id() const
+{
+    XQSERVICE_DEBUG_PRINT("XQRequestInfo::id");
+    bool b=false;
+    int id = info(XQServiceUtils::InfoId).toInt(&b);
+    XQSERVICE_DEBUG_PRINT("\tId status=%d", b);
+    if (!b)
+    {
+        return -1;
+    }
+    return id;
+}
+
 bool XQRequestInfo::isValid() const
 {
     return !mInfo.isEmpty();