Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implentation dbus in rivendell #537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ AC_PROG_CXX
AC_PROG_LIBTOOL
AC_LANG(C++)

#
# ADD C++11 for dbus system required for (std::function and reinterpret_cast)
#
CXXFLAGS="$CXXFLAGS -std=c++11"

# to avoid rpath usage :
# http://wiki.debian.net/index.cgi?RpathIssue
case ${host} in
Expand Down Expand Up @@ -118,7 +123,7 @@ AC_ARG_ENABLE(rdxport-debug,[ --enable-rdxport-debug enable DEBUG support for
#
# Check for Qt4 (Mandatory)
#
PKG_CHECK_MODULES(QT4,QtCore QtGui QtNetwork QtSql QtXml Qt3Support,,[AC_MSG_ERROR([*** Qt4 not found ***])])
PKG_CHECK_MODULES(QT4,QtCore QtGui QtNetwork QtSql QtDBus QtXml Qt3Support,,[AC_MSG_ERROR([*** Qt4 not found ***])])
AC_CHECK_PROG(MOC_NAME,moc-qt4,[moc-qt4],[moc])
AC_SUBST(QT_MOC,$MOC_NAME)

Expand Down Expand Up @@ -300,7 +305,7 @@ if test -z $MP4V2_DISABLED ; then
if test $MP4V2_FOUND ; then
AC_DEFINE(HAVE_MP4_LIBS)
fi
fi
fi
fi

#
Expand Down Expand Up @@ -372,7 +377,7 @@ if test $HPI_FOUND ; then
AC_SUBST(HPI_FILE2,$LIB_PATH/librdhpi.a)
AC_SUBST(HPI_FILE3,$LIB_PATH/librdhpi.la)
AC_SUBST(HPI_FILE4,$LIB_PATH/librdhpi.so)
else
else
AC_SUBST(LIBHPI,"")
AC_SUBST(HPI_FILE1,"")
AC_SUBST(HPI_FILE2,"")
Expand All @@ -397,10 +402,10 @@ if test $JACK_FOUND ; then
AC_SUBST(LIBJACK,-ljack)
SRC_NEEDED=yes
USING_JACK=yes
else
else
AC_SUBST(LIBJACK,"")
fi
else
else
AC_SUBST(LIBJACK,"")
fi

Expand All @@ -413,10 +418,10 @@ if test $ALSA_FOUND ; then
AC_SUBST(LIBALSA,-lasound)
SRC_NEEDED=yes
USING_ALSA=yes
else
else
AC_SUBST(LIBALSA,"")
fi
else
else
AC_SUBST(LIBALSA,"")
fi
AM_CONDITIONAL([ALSA_RD_AM], [test "$USING_ALSA" = yes])
Expand Down Expand Up @@ -454,7 +459,7 @@ dnl AC_SUBST(RPM_ROOT,/usr/src/redhat)
else
dnl AC_SUBST(RPM_ROOT,/usr/src/packages)
AC_SUBST(VENDOR,suse)
fi
fi
AC_SUBST(RPM_DATESTAMP,`date +%a\ %b\ %d\ %Y`)

#
Expand Down
12 changes: 10 additions & 2 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ moc_%.cpp: %.h
instdir = @LOCAL_PREFIX@/lib

# I18N Stuff
install-exec-local:
install-exec-local:
mkdir -p $(DESTDIR)$(prefix)/share/rivendell
cp librd_*.qm $(DESTDIR)$(prefix)/share/rivendell

uninstall-local:
rm -f $(DESTDIR)$(prefix)/share/rivendell/librd_*.qm

all:
all:
lupdate-qt4 lib.pro
lrelease-qt4 lib.pro

Expand All @@ -57,6 +57,12 @@ dist_librd_la_SOURCES = dbversion.h\
export_spincount.cpp\
export_technical.cpp\
export_textlog.cpp\
dbusfield.cpp dbusfield.h\
dbuslink_adaptor.cpp dbuslink_adaptor.h\
dbuslink.cpp dbuslink.h\
dbusmethod.cpp dbusmethod.h\
dbusmodule.h\
dbusmoduleglobal.h\
rdadd_cart.cpp rdadd_cart.h\
rdadd_log.cpp rdadd_log.h\
rdairplay_conf.cpp rdairplay_conf.h\
Expand Down Expand Up @@ -246,6 +252,8 @@ dist_librd_la_SOURCES = dbversion.h\


nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
moc_dbuslink_adaptor.cpp\
moc_dbuslink.cpp\
moc_rdadd_log.cpp\
moc_rdapplication.cpp\
moc_rdaudioconvert.cpp\
Expand Down
67 changes: 67 additions & 0 deletions lib/dbusfield.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#include "dbusfield.h"

DbusField::DbusField(QString nameq)
{
name=nameq;
}

QString DbusField::getName(){
return name;
}
int DbusField::getInt()
{
return *intp;
}
void DbusField::setInt(int* a)
{
intp=a;
}
QDate DbusField::getDate()
{
return *datep;
}
void DbusField::setDate(QDate* a)
{
datep=a;
}
bool DbusField::getBoolean()
{
return *boolp;
}
void DbusField::setBoolean(bool* a)
{
boolp=a;
}
double DbusField::getDouble()
{
return *doublep;
}
void DbusField::setDouble(double* a)
{
doublep=a;
}
QString DbusField::getString()
{
return *stringp;
}
void DbusField::setString(QString* a)
{
stringp=a;
}
QTime DbusField::getTime()
{
return *timep;
}
void DbusField::setQTime(QTime* a)
{
timep=a;
}

QString DbusField::getLabel()
{
return QString(labelp->text());
}
void DbusField::setLabel(QLabel* a)
{
labelp=a;
}
50 changes: 50 additions & 0 deletions lib/dbusfield.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#ifndef DBUSFIELD_H
#define DBUSFIELD_H

#include <QString>
#include <QTime>
#include <QLabel>

/**
Name: DbusField
Description: Add Field to DbusAPI
Example: DbusField field = new DbusField("test"); field.setInt(%test);
*/
class DbusField
{
public:
DbusField(QString name);


QString getName();
int getInt();
void setInt(int* a);
double getDouble();
void setDouble(double* a);
QString getString();
void setString(QString* a);
QTime getTime();
void setQTime(QTime* a);

QDate getDate();
void setDate(QDate* a);
bool getBoolean();
void setBoolean(bool* a);

QString getLabel();
void setLabel(QLabel* a);

private:
QString name;
int* intp;
double* doublep;
QTime* timep;
QString* stringp;
QLabel* labelp;

QDate* datep;
bool* boolp;

};

#endif // DBUSFIELD_H
Empty file added lib/dbuslink.cpp
Empty file.
Loading