[dbus] mark deprecated old style for custom dbus property naming.
[profile/ivi/automotive-message-broker.git] / plugins / gpsnmea / gpsnmea.h
index 3791f7c..f1cee60 100644 (file)
@@ -20,48 +20,39 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #define GPSNMEAPLUGIN_H
 
 #include <abstractsource.h>
+
 #include <string>
 
-#include "abstractio.hpp"
+#include <abstractio.hpp>
+#include <ambpluginimpl.h>
 
 using namespace std;
 
 class Location;
+class Bluetooth5;
+class BluetoothDevice;
 
-class GpsNmeaSource: public AbstractSource
+class GpsNmeaSource: public AmbPluginImpl
 {
 
 public:
-       GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config);
+       GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config, AbstractSource &parent);
        ~GpsNmeaSource();
-       
-       const string uuid();
-       void getPropertyAsync(AsyncPropertyReply *reply);
-       void getRangePropertyAsync(AsyncRangePropertyReply *reply);
-       AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
-       void subscribeToPropertyChanges(VehicleProperty::Property property);
-       void unsubscribeToPropertyChanges(VehicleProperty::Property property);
-       PropertyList supported();
-
-       int supportedOperations();
-       
-       void supportedChanged(PropertyList) {}
-       
-       PropertyInfo getPropertyInfo(VehicleProperty::Property property)
-       {
-               if(propertyInfoMap.find(property) != propertyInfoMap.end())
-                       return propertyInfoMap[property];
-
-               return PropertyInfo::invalid();
-       }
+
+       const string uuid() const;
 
        void canHasData();
-       
-private:
 
-       void addPropertySupport(VehicleProperty::Property property, Zone::Type zone);
+       void test();
+
+       int supportedOperations() const;
+
+       void init();
 
-       std::map<VehicleProperty::Property, PropertyInfo> propertyInfoMap;
+private:
+       bool tryParse(std::string data);
+
+       bool checksum(string sentence);
 
        PropertyList mRequests;
        PropertyList mSupported;
@@ -70,6 +61,16 @@ private:
        Location *location;
 
        std::string mUuid;
+
+       std::string buffer;
+
+       std::shared_ptr<AbstractPropertyType> rawNmea;
+
+#ifdef USE_BLUEZ5
+       Bluetooth5 * bt;
+#else
+       BluetoothDevice *bt;
+#endif
 };
 
 #endif // EXAMPLEPLUGIN_H