Commit d078d05b authored by Sebastian Pölsterl's avatar Sebastian Pölsterl

Initial import

parents
.tm_project*
.libs
.deps
.*swp
.nautilus-metafile.xml
*.autosave
*.pws
*.bak
*~
#*#
*.gladep
*.la
*.lo
*.o
*.class
*.py[co]
*.stamp
stamp-it
aclocal.m4
autom4te.cache
config.h
config.h.in
config.log
config.status
configure
intltool-extract*
intltool-merge*
intltool-modules*
intltool-update*
libtool
prepare.sh
stamp-h*
ltmain.sh
mkinstalldirs
config.guess
config.sub
Makefile
Makefile.in
install-sh
missing
depcomp
po/POTFILES
INSTALL
compile
Sebastian Pölsterl <marduk@k-d-w.org>
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Sebastian Pölsterl
E-mail: marduk@k-d-w.org
NULL =
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS = \
data \
po \
$(NULL)
AM_CPPFLAGS = \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
$(DVB_DAEMON_CFLAGS) \
-include $(CONFIG_HEADER) \
$(NULL)
BUILT_SOURCES = \
src/dvb-daemon.vala.stamp
$(NULL)
bin_PROGRAMS = dvb-daemon
dvb_daemon_VALASOURCES = \
src/Main.vala \
src/Device.vala \
src/Scanner.vala \
src/MpegTsEnums.vala \
src/Channel.vala \
src/ScannedItem.vala \
src/Manager.vala \
src/Constants.vala \
$(NULL)
dvb_daemon_SOURCES = \
$(dvb_daemon_VALASOURCES:.vala=.c) \
$(dvb_daemon_VALASOURCES:.vala=.h) \
$(NULL)
vala_pkgs = \
--pkg gtk+-2.0 \
--pkg dbus-glib-1 \
--pkg gstreamer-0.10 \
--pkg gee-1.0
src/dvb-daemon.vala.stamp: $(dvb_daemon_VALASOURCES)
$(VALAC) -C $(vala_pkgs) --basedir $(top_srcdir) $^
touch $@
dvb_daemon_LDFLAGS = \
-Wl,--export-dynamic
dvb_daemon_LDADD = \
$(DVB_DAEMON_LIBS) \
$(NULL)
EXTRA_DIST = \
intltool-extract.in \
intltool-update.in \
intltool-merge.in \
$(dvb_daemon_VALASOURCES) \
src/dvb-daemon.vala.stamp \
$(NULL)
DISTCLEANFILES = \
intltool-extract \
intltool-update \
intltool-merge \
po/.intltool-merge-cache \
$(NULL)
AC_DEFUN([SHAMROCK_EXPAND_LIBDIR],
[
expanded_libdir=`(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
eval echo $libdir
)`
AC_SUBST(expanded_libdir)
])
AC_DEFUN([SHAMROCK_EXPAND_BINDIR],
[
expanded_bindir=`(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
eval echo $bindir
)`
AC_SUBST(expanded_bindir)
])
AC_DEFUN([SHAMROCK_EXPAND_DATADIR],
[
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
expanded_datadir=`(eval echo $datadir)`
expanded_datadir=`(eval echo $expanded_datadir)`
AC_SUBST(expanded_datadir)
])
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="Projekte"
. gnome-autogen.sh
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dbus
import dbus.glib
import gobject
service = "org.gnome.DVB"
manager_iface = "org.gnome.DVB.Manager"
manager_path = "/org/gnome/DVB/Manager"
scanner_iface = "org.gnome.DVB.Scanner"
class DVBClient:
def __init__(self):
self.bus = dbus.SessionBus()
# Get proxy object
proxy = self.bus.get_object(service, manager_path)
# Apply the correct interace to the proxy object
self.manager = dbus.Interface(proxy, manager_iface)
def get_scanner_for_device(self, adapter, frontend):
objpath = self.manager.GetScannerForDevice (adapter, frontend)
print objpath
#proxy = self.bus.get_object(service, objpath)
#self.scanner = dbus.Interface(proxy, scanner_iface)
c = DVBClient()
c.get_scanner_for_device(0,0)
c.scanner.run()
loop = gobject.MainLoop()
loop.run()
AC_INIT([dvb-daemon], [0.1.0], [marduk@k-d-w.org], [dvb-daemon])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_CC_C_O
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PATH_PROG(VALAC, valac, valac)
AC_SUBST(VALAC)
AH_TEMPLATE([GETTEXT_PACKAGE], [dvb-daemon])
GETTEXT_PACKAGE=dvb-daemon
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
GLIB_REQUIRED=2.12.0
GTK_REQUIRED=2.10.0
GST_REQUIRED=0.10.19
DBUS_REQUIRED=0.74
GEE_REQUIRED=0.1.4
PKG_CHECK_MODULES(DVB_DAEMON, glib-2.0 >= $GLIB_REQUIRED
gobject-2.0 >= $GLIB_REQUIRED
gstreamer-0.10 >= $GST_REQUIRED
dbus-glib-1 >= $DBUS_REQUIRED
gee-1.0 >= $GEE_REQUIRED)
AC_SUBST(DVB_DAEMON_CFLAGS)
AC_SUBST(DVB_DAEMON_LIBS)
dnl Expansions
SHAMROCK_EXPAND_DATADIR
SHAMROCK_EXPAND_LIBDIR
dnl ****************************************************************************
dnl * Check for DBUS Services directory
dnl ****************************************************************************
DBUS_REQUIRED_VERSION=1.1
PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED_VERSION)
DBUS_SERVICES_DIR="$expanded_datadir/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [DBus services directory])
AC_CONFIG_FILES([
Makefile
data/Makefile
po/Makefile.in])
AC_OUTPUT
echo "
$PACKAGE_NAME $PACKAGE_VERSION
Install Prefix: ${prefix}
Datadir: ${expanded_datadir}
Libdir: ${expanded_libdir}
D-Bus dir: ${DBUS_SERVICES_DIR}
"
# Dbus service file
dbusservicedir = $(DBUS_SERVICES_DIR)
dbusservice_in_files = org.gnome.DVB.service.in
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
# Rule to make the service file with bindir expanded
$(dbusservice_DATA): $(dbusservice_in_files) Makefile
@sed -e "s|\@bindir\@|$(bindir)|" $< > $@
CLEANFILES = $(dbusservice_DATA)
EXTRA_DIST = $(dbusservice_in_files)
[D-BUS Service]
Name=org.gnome.DVB
Exec=@bindir@/dvb-daemon
# please keep this list sorted alphabetically
#
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
#
# This file may be copied and used freely without restrictions. It may
# be used in projects which are not available under a GNU Public License,
# but which still want to provide support for the GNU gettext functionality.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
# This comment gets stripped out
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
$(mkdir_p) $(DESTDIR)$(itlocaledir)
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
# Empty stubs to satisfy archaic automake needs
dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
rm -f missing notexist
srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
if [ -r missing -o -r notexist ]; then \
exit 1; \
fi
mostlyclean:
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
[encoding: UTF-8]
# List of source files which contain translatable strings.
src/Main.vala
using GLib;
namespace DVB {
public class Channel : GLib.Object {
public uint Sid {get; construct;}
public string Name {get; set;}
public uint TransportStreamId {get; set;}
public string Network {get; set;}
public uint? LogicalChannelNumber {get; set;}
public Channel (uint sid) {
this.Sid = sid;
}
}
}
using GLib;
namespace DVB {
public static class Constants {
public static const string DBUS_SERVICE = "org.gnome.DVB";
public static const string DBUS_MANAGER_PATH = "/org/gnome/DVB/Manager";
public static const string DBUS_SCANNER_PATH = "/org/gnome/DVB/Scanner/%d/%d";
}
}
using GLib;
using Gst;
namespace DVB {
public enum AdapterType {
DVB_T,
DVB_S,
DVB_C,
UNKNOWN
}
public class Device : GLib.Object {
public uint Adapter { get; construct; }
public uint Frontend { get; construct; }
public AdapterType Type { get; construct; }
public Device (uint adapter, uint frontend) {
this.Adapter = adapter;
this.Frontend = frontend;