From ed8817e3aced55cfc07fe34f6a4335f769d22ceb Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 12 Jan 2018 18:54:27 +0900 Subject: Change class name Change-Id: I224961cfdb6ca1688fdff1f26947af0c5388bde4 Signed-off-by: Kazumasa Mitsunari --- src/qlibsoundmanager.cpp | 24 ++++++++++++------------ src/qlibsoundmanager.h | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') 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); -- cgit 1.2.3-korg