[general] "poor programming style" fix
[libxmms2client-qt.git] / common.h
blob8a2a490ee01e8c91f611687a8bd03e341f65e573
1 //
2 // C++ Interface: common
3 //
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
5 //
6 // Copyright: See COPYING file that comes with this distribution
7 //
9 #ifndef XMMSQT_COMMON_H
10 #define XMMSQT_COMMON_H
11 #include <xmmsclient/xmmsclient.h>
13 namespace XmmsQt {
14 inline void connectNotifierUnref(xmmsc_result_t * result, xmmsc_result_notifier_t callback, void * userdata) {
15 xmmsc_result_notifier_set(result, callback, userdata);
16 xmmsc_result_unref(result);
19 inline void disconnectNotifierUnref(xmmsc_result_t * result) {
20 xmmsc_result_disconnect(result);
21 xmmsc_result_unref(result);
24 inline bool resultHasKey(xmmsc_result_t * result, const char * key) {
25 return xmmsc_result_get_dict_entry_type(result, key) != XMMSC_RESULT_VALUE_TYPE_NONE;
28 #endif