[bluemonkey] more fixes
[profile/ivi/automotive-message-broker.git] / plugins / bluemonkey / authenticate.h
1 #ifndef AUTHENTICATE_H
2 #define AUTHENTICATE_H
3
4 #include <QObject>
5 #include <QStringList>
6 #include <map>
7 #include <string>
8
9 class Authenticate : public QObject
10 {
11     Q_OBJECT
12         Q_PROPERTY(QString pin READ pin WRITE setPin)
13 public:
14         explicit Authenticate(std::map<std::string, std::string> config, QObject *parent = 0);
15         void setPin(QString p) { mPin = p; }
16         QString pin() { return mPin; }
17
18
19 public Q_SLOTS:
20         bool isAuthorized(QString prefix);
21         bool authorize(QString prefix, QString pin);
22
23 private:
24         QStringList authorized;
25         QString mPin;
26 };
27
28 #endif // AUTHENTICATE_H