Added reset button to exposure settings
[harmattan/cameraplus] / lib / qtcamcapability_p.h
index 1ff58be..51b36f2 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -24,6 +24,7 @@
 #define QT_CAM_CAPABILITY_P_H
 
 #include <gst/gst.h>
+#include "qtcamcapability.h"
 #include "qtcamdevice.h"
 #include "qtcamdevice_p.h"
 
@@ -65,7 +66,7 @@ public:
   void startMonitoring() {
     if (src) {
       QString p = QString("notify::%1").arg(prop);
-      handler = g_signal_connect(src, p.toAscii().data(), G_CALLBACK(camera_src_notify), this);
+      handler = g_signal_connect(src, p.toLatin1().data(), G_CALLBACK(camera_src_notify), this);
     }
   }
 
@@ -80,7 +81,7 @@ public:
       return false;
     }
 
-    g_object_get(src, prop.toAscii().data(), val, NULL);
+    g_object_get(src, prop.toLatin1().data(), val, NULL);
 
     return true;
   }
@@ -90,7 +91,7 @@ public:
       return false;
     }
 
-    g_object_set(src, prop.toAscii().data(), val, NULL);
+    g_object_set(src, prop.toLatin1().data(), val, NULL);
 
     return true;
   }
@@ -100,7 +101,7 @@ public:
       return false;
     }
 
-    g_object_get(src, prop.toAscii().data(), val, NULL);
+    g_object_get(src, prop.toLatin1().data(), val, NULL);
 
     return true;
   }
@@ -111,15 +112,15 @@ public:
     }
 
     if (force) {
-      g_object_set(src, prop.toAscii().data(), val, NULL);
+      g_object_set(src, prop.toLatin1().data(), val, NULL);
       return true;
     }
 
     int old = 0;
-    g_object_get(src, prop.toAscii().data(), &old, NULL);
+    g_object_get(src, prop.toLatin1().data(), &old, NULL);
 
     if (old != val) {
-      g_object_set(src, prop.toAscii().data(), val, NULL);
+      g_object_set(src, prop.toLatin1().data(), val, NULL);
     }
 
     return true;
@@ -130,7 +131,7 @@ public:
       return false;
     }
 
-    g_object_get(src, prop.toAscii().data(), val, NULL);
+    g_object_get(src, prop.toLatin1().data(), val, NULL);
 
     return true;
   }
@@ -140,7 +141,7 @@ public:
       return false;
     }
 
-    g_object_set(src, prop.toAscii().data(), val, NULL);
+    g_object_set(src, prop.toLatin1().data(), val, NULL);
 
     return true;
   }