diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-01-12 18:54:27 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-28 15:16:45 +0900 |
commit | ed8817e3aced55cfc07fe34f6a4335f769d22ceb (patch) | |
tree | 9aebd8aca10e3ef2fdf643692c69ed2cfab90411 | |
parent | 9284f0d2684f299b8e76550be2d8b889d266d2d2 (diff) |
Change class name
Change-Id: I224961cfdb6ca1688fdff1f26947af0c5388bde4
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r-- | src/qlibsoundmanager.cpp | 24 | ||||
-rw-r--r-- | src/qlibsoundmanager.h | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/qlibsoundmanager.cpp b/src/qlibsoundmanager.cpp index 98d6043..39fb871 100644 --- a/src/qlibsoundmanager.cpp +++ b/src/qlibsoundmanager.cpp @@ -20,7 +20,7 @@ using namespace std; static int create_json_object(const QJsonObject& obj, struct json_object* jobj); static bool put_val_to_jobj(const char* key, const QJsonValue& val, struct json_object* jobj); -QLibSoundmanager* me; +QSoundmanager* me; static void cbEvent_static(const std::string& event, struct json_object* event_contents) { @@ -44,18 +44,18 @@ static void cbReply_static(struct json_object* replyContents) emit me->reply(jobj); } -QLibSoundmanager::QLibSoundmanager(QObject *parent) : +QSoundmanager::QSoundmanager(QObject *parent) : QObject(parent) { libsm = new Soundmanager(); } -QLibSoundmanager::~QLibSoundmanager() +QSoundmanager::~QSoundmanager() { delete libsm; } -int QLibSoundmanager::init(int port, const QString& token) +int QSoundmanager::init(int port, const QString& token) { if(libsm == nullptr){ return -1; @@ -73,7 +73,7 @@ int QLibSoundmanager::init(int port, const QString& token) return rc; } -int QLibSoundmanager::call(const QString &verb, const QJsonObject &arg) +int QSoundmanager::call(const QString &verb, const QJsonObject &arg) { // translate QJsonObject to struct json_object struct json_object* jobj = json_object_new_object(); @@ -85,22 +85,22 @@ int QLibSoundmanager::call(const QString &verb, const QJsonObject &arg) return libsm->call(verb.toStdString().c_str(), jobj); } -int QLibSoundmanager::connect(int sourceID, const QString& sinkName){ +int QSoundmanager::connect(int sourceID, const QString& sinkName){ string str = sinkName.toStdString(); return libsm->connect(sourceID, str); } -int QLibSoundmanager::connect(int sourceID, int sinkID){ +int QSoundmanager::connect(int sourceID, int sinkID){ return libsm->connect(sourceID, sinkID); } -int QLibSoundmanager::disconnect(int connectionID){ +int QSoundmanager::disconnect(int connectionID){ return libsm->disconnect(connectionID); } -int QLibSoundmanager::ackSetSourceState(int handle, int errorcode){ +int QSoundmanager::ackSetSourceState(int handle, int errorcode){ return libsm->ackSetSourceState(handle, errorcode); } -int QLibSoundmanager::registerSource(const QString& name){ +int QSoundmanager::registerSource(const QString& name){ string str = name.toStdString(); return libsm->registerSource(str); } @@ -145,13 +145,13 @@ static bool put_val_to_jobj(const char* key, const QJsonValue& val, struct json_ } -void QLibSoundmanager::subscribe(const QString event_name) +void QSoundmanager::subscribe(const QString event_name) { std::string str = event_name.toStdString(); libsm->subscribe(str); } -void QLibSoundmanager::unsubscribe(const QString event_name) +void QSoundmanager::unsubscribe(const QString event_name) { std::string str = event_name.toStdString(); libsm->unsubscribe(str); diff --git a/src/qlibsoundmanager.h b/src/qlibsoundmanager.h index 6ce5b46..aefe175 100644 --- a/src/qlibsoundmanager.h +++ b/src/qlibsoundmanager.h @@ -25,12 +25,12 @@ // Note: This wrapper library will be integrated to libqtappfw -class QLibSoundmanager : public QObject +class QSoundmanager : public QObject { Q_OBJECT public: // method - explicit QLibSoundmanager(QObject *parent = nullptr); - ~QLibSoundmanager(); + explicit QSoundmanager(QObject *parent = nullptr); + ~QSoundmanager(); int init(int port, const QString& token); void subscribe(const QString event_name); void unsubscribe(const QString event_name); |