libdmapsharing-2.9.41/ 0000755 0002115 0001752 00000000000 13701471355 011600 5 0000000 0000000 libdmapsharing-2.9.41/config.sub 0000755 0002115 0001752 00000075304 13614025077 013513 0000000 0000000 #! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2018-08-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo "$1"
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Split fields of configuration type
IFS="-" read -r field1 field2 field3 field4 <&2
exit 1
;;
*-*-*-*)
basic_machine=$field1-$field2
os=$field3-$field4
;;
*-*-*)
# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
# parts
maybe_os=$field2-$field3
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
| storm-chaos* | os2-emx* | rtmk-nova*)
basic_machine=$field1
os=$maybe_os
;;
android-linux)
basic_machine=$field1-unknown
os=linux-android
;;
*)
basic_machine=$field1-$field2
os=$field3
;;
esac
;;
*-*)
# A lone config we happen to match not fitting any patern
case $field1-$field2 in
decstation-3100)
basic_machine=mips-dec
os=
;;
*-*)
# Second component is usually, but not always the OS
case $field2 in
# Prevent following clause from handling this valid os
sun*os*)
basic_machine=$field1
os=$field2
;;
# Manufacturers
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
| unicom* | ibm* | next | hp | isi* | apollo | altos* \
| convergent* | ncr* | news | 32* | 3600* | 3100* \
| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
| ultra | tti* | harris | dolphin | highlevel | gould \
| cbm | ns | masscomp | apple | axis | knuth | cray \
| microblaze* | sim | cisco \
| oki | wec | wrs | winbond)
basic_machine=$field1-$field2
os=
;;
*)
basic_machine=$field1
os=$field2
;;
esac
;;
esac
;;
*)
# Convert single-component short-hands not valid as part of
# multi-component configurations.
case $field1 in
386bsd)
basic_machine=i386-pc
os=bsd
;;
a29khif)
basic_machine=a29k-amd
os=udi
;;
adobe68k)
basic_machine=m68010-adobe
os=scout
;;
alliant)
basic_machine=fx80-alliant
os=
;;
altos | altos3068)
basic_machine=m68k-altos
os=
;;
am29k)
basic_machine=a29k-none
os=bsd
;;
amdahl)
basic_machine=580-amdahl
os=sysv
;;
amiga)
basic_machine=m68k-unknown
os=
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=bsd
;;
aros)
basic_machine=i386-pc
os=aros
;;
aux)
basic_machine=m68k-apple
os=aux
;;
balance)
basic_machine=ns32k-sequent
os=dynix
;;
blackfin)
basic_machine=bfin-unknown
os=linux
;;
cegcc)
basic_machine=arm-unknown
os=cegcc
;;
convex-c1)
basic_machine=c1-convex
os=bsd
;;
convex-c2)
basic_machine=c2-convex
os=bsd
;;
convex-c32)
basic_machine=c32-convex
os=bsd
;;
convex-c34)
basic_machine=c34-convex
os=bsd
;;
convex-c38)
basic_machine=c38-convex
os=bsd
;;
cray)
basic_machine=j90-cray
os=unicos
;;
crds | unos)
basic_machine=m68k-crds
os=
;;
da30)
basic_machine=m68k-da30
os=
;;
decstation | pmax | pmin | dec3100 | decstatn)
basic_machine=mips-dec
os=
;;
delta88)
basic_machine=m88k-motorola
os=sysv3
;;
dicos)
basic_machine=i686-pc
os=dicos
;;
djgpp)
basic_machine=i586-pc
os=msdosdjgpp
;;
ebmon29k)
basic_machine=a29k-amd
os=ebmon
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=ose
;;
gmicro)
basic_machine=tron-gmicro
os=sysv
;;
go32)
basic_machine=i386-pc
os=go32
;;
h8300hms)
basic_machine=h8300-hitachi
os=hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=hms
;;
harris)
basic_machine=m88k-harris
os=sysv3
;;
hp300)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=hpux
;;
hppaosf)
basic_machine=hppa1.1-hp
os=osf
;;
hppro)
basic_machine=hppa1.1-hp
os=proelf
;;
i386mach)
basic_machine=i386-mach
os=mach
;;
vsta)
basic_machine=i386-pc
os=vsta
;;
isi68 | isi)
basic_machine=m68k-isi
os=sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=linux
;;
magnum | m3230)
basic_machine=mips-mips
os=sysv
;;
merlin)
basic_machine=ns32k-utek
os=sysv
;;
mingw64)
basic_machine=x86_64-pc
os=mingw64
;;
mingw32)
basic_machine=i686-pc
os=mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=mingw32ce
;;
monitor)
basic_machine=m68k-rom68k
os=coff
;;
morphos)
basic_machine=powerpc-unknown
os=morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=moxiebox
;;
msdos)
basic_machine=i386-pc
os=msdos
;;
msys)
basic_machine=i686-pc
os=msys
;;
mvs)
basic_machine=i370-ibm
os=mvs
;;
nacl)
basic_machine=le32-unknown
os=nacl
;;
ncr3000)
basic_machine=i486-ncr
os=sysv4
;;
netbsd386)
basic_machine=i386-pc
os=netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=newsos
;;
news1000)
basic_machine=m68030-sony
os=newsos
;;
necv70)
basic_machine=v70-nec
os=sysv
;;
nh3000)
basic_machine=m68k-harris
os=cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=cxux
;;
nindy960)
basic_machine=i960-intel
os=nindy
;;
mon960)
basic_machine=i960-intel
os=mon960
;;
nonstopux)
basic_machine=mips-compaq
os=nonstopux
;;
os400)
basic_machine=powerpc-ibm
os=os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=ose
;;
os68k)
basic_machine=m68k-none
os=os68k
;;
paragon)
basic_machine=i860-intel
os=osf
;;
parisc)
basic_machine=hppa-unknown
os=linux
;;
pw32)
basic_machine=i586-unknown
os=pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=rdos
;;
rdos32)
basic_machine=i386-pc
os=rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=coff
;;
sa29200)
basic_machine=a29k-amd
os=udi
;;
sei)
basic_machine=mips-sei
os=seiux
;;
sequent)
basic_machine=i386-sequent
os=
;;
sps7)
basic_machine=m68k-bull
os=sysv2
;;
st2000)
basic_machine=m68k-tandem
os=
;;
stratus)
basic_machine=i860-stratus
os=sysv4
;;
sun2)
basic_machine=m68000-sun
os=
;;
sun2os3)
basic_machine=m68000-sun
os=sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=sunos4
;;
sun3)
basic_machine=m68k-sun
os=
;;
sun3os3)
basic_machine=m68k-sun
os=sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=sunos4
;;
sun4)
basic_machine=sparc-sun
os=
;;
sun4os3)
basic_machine=sparc-sun
os=sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=solaris2
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
os=
;;
sv1)
basic_machine=sv1-cray
os=unicos
;;
symmetry)
basic_machine=i386-sequent
os=dynix
;;
t3e)
basic_machine=alphaev5-cray
os=unicos
;;
t90)
basic_machine=t90-cray
os=unicos
;;
toad1)
basic_machine=pdp10-xkl
os=tops20
;;
tpf)
basic_machine=s390x-ibm
os=tpf
;;
udi29k)
basic_machine=a29k-amd
os=udi
;;
ultra3)
basic_machine=a29k-nyu
os=sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=none
;;
vaxv)
basic_machine=vax-dec
os=sysv
;;
vms)
basic_machine=vax-dec
os=vms
;;
vxworks960)
basic_machine=i960-wrs
os=vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=vxworks
;;
xbox)
basic_machine=i686-pc
os=mingw32
;;
ymp)
basic_machine=ymp-cray
os=unicos
;;
*)
basic_machine=$1
os=
;;
esac
;;
esac
# Decode 1-component or ad-hoc basic machines
case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
cpu=hppa1.1
vendor=winbond
;;
op50n)
cpu=hppa1.1
vendor=oki
;;
op60c)
cpu=hppa1.1
vendor=oki
;;
ibm*)
cpu=i370
vendor=ibm
;;
orion105)
cpu=clipper
vendor=highlevel
;;
mac | mpw | mac-mpw)
cpu=m68k
vendor=apple
;;
pmac | pmac-mpw)
cpu=powerpc
vendor=apple
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
cpu=m68000
vendor=att
;;
3b*)
cpu=we32k
vendor=att
;;
bluegene*)
cpu=powerpc
vendor=ibm
os=cnk
;;
decsystem10* | dec10*)
cpu=pdp10
vendor=dec
os=tops10
;;
decsystem20* | dec20*)
cpu=pdp10
vendor=dec
os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
cpu=m68k
vendor=motorola
;;
dpx2*)
cpu=m68k
vendor=bull
os=sysv3
;;
encore | umax | mmax)
cpu=ns32k
vendor=encore
;;
elxsi)
cpu=elxsi
vendor=elxsi
os=${os:-bsd}
;;
fx2800)
cpu=i860
vendor=alliant
;;
genix)
cpu=ns32k
vendor=ns
;;
h3050r* | hiux*)
cpu=hppa1.1
vendor=hitachi
os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
cpu=hppa1.0
vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
cpu=m68000
vendor=hp
;;
hp9k3[2-9][0-9])
cpu=m68k
vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
cpu=hppa1.0
vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
cpu=hppa1.1
vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
cpu=hppa1.1
vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
cpu=hppa1.1
vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
cpu=hppa1.1
vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
cpu=hppa1.0
vendor=hp
;;
i*86v32)
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
os=sysv32
;;
i*86v4*)
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
os=sysv4
;;
i*86v)
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
os=sysv
;;
i*86sol2)
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
os=solaris2
;;
j90 | j90-cray)
cpu=j90
vendor=cray
os=${os:-unicos}
;;
iris | iris4d)
cpu=mips
vendor=sgi
case $os in
irix*)
;;
*)
os=irix4
;;
esac
;;
miniframe)
cpu=m68000
vendor=convergent
;;
*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
cpu=m68k
vendor=atari
os=mint
;;
news-3600 | risc-news)
cpu=mips
vendor=sony
os=newsos
;;
next | m*-next)
cpu=m68k
vendor=next
case $os in
nextstep* )
;;
ns2*)
os=nextstep2
;;
*)
os=nextstep3
;;
esac
;;
np1)
cpu=np1
vendor=gould
;;
op50n-* | op60c-*)
cpu=hppa1.1
vendor=oki
os=proelf
;;
pa-hitachi)
cpu=hppa1.1
vendor=hitachi
os=hiuxwe2
;;
pbd)
cpu=sparc
vendor=tti
;;
pbb)
cpu=m68k
vendor=tti
;;
pc532)
cpu=ns32k
vendor=pc532
;;
pn)
cpu=pn
vendor=gould
;;
power)
cpu=power
vendor=ibm
;;
ps2)
cpu=i386
vendor=ibm
;;
rm[46]00)
cpu=mips
vendor=siemens
;;
rtpc | rtpc-*)
cpu=romp
vendor=ibm
;;
sde)
cpu=mipsisa32
vendor=sde
os=${os:-elf}
;;
simso-wrs)
cpu=sparclite
vendor=wrs
os=vxworks
;;
tower | tower-32)
cpu=m68k
vendor=ncr
;;
vpp*|vx|vx-*)
cpu=f301
vendor=fujitsu
;;
w65)
cpu=w65
vendor=wdc
;;
w89k-*)
cpu=hppa1.1
vendor=winbond
os=proelf
;;
none)
cpu=none
vendor=none
;;
leon|leon[3-9])
cpu=sparc
vendor=$basic_machine
;;
leon-*|leon[3-9]-*)
cpu=sparc
vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
*-*)
IFS="-" read -r cpu vendor <&2
exit 1
;;
esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $vendor in
digital*)
vendor=dec
;;
commodore*)
vendor=cbm
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x$os != x ]
then
case $os in
# First match some system type aliases that might get confused
# with valid system types.
# solaris* is a basic system type, with this one exception.
auroraux)
os=auroraux
;;
bluegene*)
os=cnk
;;
solaris1 | solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
solaris)
os=solaris2
;;
unixware*)
os=sysv4.2uw
;;
gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# es1800 is here to avoid being matched by es* (a different OS)
es1800*)
os=ose
;;
# Some version numbers need modification
chorusos*)
os=chorusos
;;
isc)
os=isc2.2
;;
sco6)
os=sco5v6
;;
sco5)
os=sco3.2v5
;;
sco4)
os=sco3.2v4
;;
sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
;;
sco3.2v[4-9]* | sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
;;
scout)
# Don't match below
;;
sco*)
os=sco3.2v2
;;
psos*)
os=psos
;;
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
# sysv* is not here because it comes later, after sysvr4.
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
| aos* | aros* | cloudabi* | sortix* \
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| knetbsd* | mirbsd* | netbsd* \
| bitrig* | openbsd* | solidbsd* | libertybsd* \
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
| udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
| chorusrdb* | cegcc* | glidix* \
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
| midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
| linux-newlib* | linux-musl* | linux-uclibc* \
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
| interix* | uwin* | mks* | rhapsody* | darwin* \
| openstep* | oskit* | conix* | pw32* | nonstopux* \
| storm-chaos* | tops10* | tenex* | tops20* | its* \
| os2* | vos* | palmos* | uclinux* | nucleus* \
| morphos* | superux* | rtmk* | windiss* \
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)
case $cpu in
x86 | i*86)
;;
*)
os=nto-$os
;;
esac
;;
hiux*)
os=hiuxwe2
;;
nto-qnx*)
;;
nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
sim | xray | os68k* | v88r* \
| windows* | osx | abug | netware* | os9* \
| macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
;;
linux-dietlibc)
os=linux-dietlibc
;;
linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
lynx*178)
os=lynxos178
;;
lynx*5)
os=lynxos5
;;
lynx*)
os=lynxos
;;
mac*)
os=`echo "$os" | sed -e 's|mac|macos|'`
;;
opened*)
os=openedition
;;
os400*)
os=os400
;;
sunos5*)
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
sunos6*)
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
wince*)
os=wince
;;
utek*)
os=bsd
;;
dynix*)
os=bsd
;;
acis*)
os=aos
;;
atheos*)
os=atheos
;;
syllable*)
os=syllable
;;
386bsd)
os=bsd
;;
ctix* | uts*)
os=sysv
;;
nova*)
os=rtmk-nova
;;
ns2)
os=nextstep2
;;
nsk*)
os=nsk
;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
sinix*)
os=sysv4
;;
tpf*)
os=tpf
;;
triton*)
os=sysv3
;;
oss*)
os=sysv3
;;
svr4*)
os=sysv4
;;
svr3)
os=sysv3
;;
sysvr4)
os=sysv4
;;
# This must come after sysvr4.
sysv*)
;;
ose*)
os=ose
;;
*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
os=mint
;;
zvmoe)
os=zvmoe
;;
dicos*)
os=dicos
;;
pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
case $cpu in
arm*)
os=eabi
;;
*)
os=elf
;;
esac
;;
nacl*)
;;
ios)
;;
none)
;;
*-eabi)
;;
*)
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $cpu-$vendor in
score-*)
os=elf
;;
spu-*)
os=elf
;;
*-acorn)
os=riscix1.2
;;
arm*-rebel)
os=linux
;;
arm*-semi)
os=aout
;;
c4x-* | tic4x-*)
os=coff
;;
c8051-*)
os=elf
;;
clipper-intergraph)
os=clix
;;
hexagon-*)
os=elf
;;
tic54x-*)
os=coff
;;
tic55x-*)
os=coff
;;
tic6x-*)
os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=tops20
;;
pdp11-*)
os=none
;;
*-dec | vax-*)
os=ultrix4.2
;;
m68*-apollo)
os=domain
;;
i386-sun)
os=sunos4.0.2
;;
m68000-sun)
os=sunos3
;;
m68*-cisco)
os=aout
;;
mep-*)
os=elf
;;
mips*-cisco)
os=elf
;;
mips*-*)
os=elf
;;
or32-*)
os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=sysv3
;;
sparc-* | *-sun)
os=sunos4.1.1
;;
pru-*)
os=elf
;;
*-be)
os=beos
;;
*-ibm)
os=aix
;;
*-knuth)
os=mmixware
;;
*-wec)
os=proelf
;;
*-winbond)
os=proelf
;;
*-oki)
os=proelf
;;
*-hp)
os=hpux
;;
*-hitachi)
os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=sysv
;;
*-cbm)
os=amigaos
;;
*-dg)
os=dgux
;;
*-dolphin)
os=sysv3
;;
m68k-ccur)
os=rtu
;;
m88k-omron*)
os=luna
;;
*-next)
os=nextstep
;;
*-sequent)
os=ptx
;;
*-crds)
os=unos
;;
*-ns)
os=genix
;;
i370-*)
os=mvs
;;
*-gould)
os=sysv
;;
*-highlevel)
os=bsd
;;
*-encore)
os=bsd
;;
*-sgi)
os=irix
;;
*-siemens)
os=sysv4
;;
*-masscomp)
os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=uxpv
;;
*-rom68k)
os=coff
;;
*-*bug)
os=coff
;;
*-apple)
os=macos
;;
*-atari*)
os=mint
;;
*-wrs)
os=vxworks
;;
*)
os=none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
case $vendor in
unknown)
case $os in
riscix*)
vendor=acorn
;;
sunos*)
vendor=sun
;;
cnk*|-aix*)
vendor=ibm
;;
beos*)
vendor=be
;;
hpux*)
vendor=hp
;;
mpeix*)
vendor=hp
;;
hiux*)
vendor=hitachi
;;
unos*)
vendor=crds
;;
dgux*)
vendor=dg
;;
luna*)
vendor=omron
;;
genix*)
vendor=ns
;;
clix*)
vendor=intergraph
;;
mvs* | opened*)
vendor=ibm
;;
os400*)
vendor=ibm
;;
ptx*)
vendor=sequent
;;
tpf*)
vendor=ibm
;;
vxsim* | vxworks* | windiss*)
vendor=wrs
;;
aux*)
vendor=apple
;;
hms*)
vendor=hitachi
;;
mpw* | macos*)
vendor=apple
;;
*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
vos*)
vendor=stratus
;;
esac
;;
esac
echo "$cpu-$vendor-$os"
exit
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
libdmapsharing-2.9.41/configure.ac 0000644 0002115 0001752 00000021561 13701471120 014001 0000000 0000000 m4_define([libdmapsharing_major], [2])
m4_define([libdmapsharing_minor], [9])
m4_define([libdmapsharing_micro], [41])
m4_define([libdmapsharing_version], [libdmapsharing_major.libdmapsharing_minor.libdmapsharing_micro])
AC_INIT(libdmapsharing, [libdmapsharing_version], [https://www.flyn.org/projects/libdmapsharing/])
API_VERSION=3.0
AC_SUBST(API_VERSION)
SO_VERSION=m4_eval(libdmapsharing_minor+libdmapsharing_major):m4_eval(libdmapsharing_micro):m4_eval(libdmapsharing_minor)
AC_SUBST(SO_VERSION)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIRS([m4])
AC_HEADER_STDC
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL
AM_PROG_CC_STDC
GOBJECT_INTROSPECTION_CHECK([1.30.0])
GTK_DOC_CHECK(1.0)
# Have pedansee?
AC_PATH_PROG(PEDANSEE, pedansee)
AM_CONDITIONAL(HAVE_PEDANSEE, test -n "$PEDANSEE")
# Select debugging or measuring code coverage?
AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[enable debugging build])])
AC_ARG_ENABLE(coverage, [AC_HELP_STRING([--enable-coverage],[enable code-coverage build])])
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g"
elif test "x$enable_coverage" = "xyes"; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
else
CFLAGS="$CFLAGS -O2"
fi
# Select more compiler warnings?
AC_ARG_ENABLE(more-warnings, [AC_HELP_STRING([--enable-more-warnings],[maximum compiler warnings])])
if test "$GCC" = "yes" -a x$enable_more_warnings = "xyes"; then
WARN_CFLAGS="\
-Wcomment -Wformat -Wnonnull -Wimplicit-int -Wimplicit \
-Wmain -Wmissing-braces -Wparentheses -Wsequence-point \
-Wreturn-type -Wswitch -Wtrigraphs -Wunused-function \
-Wunused-label -Wunused-value \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wformat-security -Wall \
-Werror -Wno-deprecated-declarations -std=gnu89"
if echo "$CFLAGS" | grep -q -- '-O' && echo "$CFLAGS" | grep -q -v -- '-O0'; then
WARN_CFLAGS="-Wuninitialized $WARN_CFLAGS"
fi
for option in $WARN_CFLAGS; do
AS_COMPILER_FLAG($option, has_option=yes, has_option=no)
if test x$has_option = xyes; then
OK_CFLAGS="$OK_CFLAGS $option"
fi
unset has_option
done
WARN_CFLAGS="$OK_CFLAGS"
fi
AC_SUBST(WARN_CFLAGS)
# Build test code?
AC_ARG_ENABLE(tests, [AC_HELP_STRING([--disable-tests],[do not build tests])], tests=$enableval, tests=yes)
if test x$tests = xyes; then
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
if test "x$have_check" = "xyes"; then
AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
else
AC_MSG_ERROR([Must have check library present when tests enabled])
fi
AC_DEFINE(TESTS_ENABLED,1,[Defined when tests are to be built])
AM_CONDITIONAL(TESTS_ENABLED, true)
else
AM_CONDITIONAL(TESTS_ENABLED, false)
AM_CONDITIONAL(HAVE_CHECK, false)
fi
# Have libz?
AC_CHECK_LIB(z, uncompress)
# Have pkg-config?
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
if test "x$HAVE_PKGCONFIG" = "xno"; then
AC_MSG_ERROR([Must have pkgconfig installed])
fi
# Have glib?
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40, HAVE_GLIB=yes,HAVE_GLIB=no)
if test "x$HAVE_GLIB" = "xno"; then
AC_MSG_ERROR([Must have glib-2.0 installed])
fi
AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_40, [minimum glib version])
AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_40, [maximum glib version])
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
# Have gthread?
PKG_CHECK_MODULES(GTHREAD, gthread-2.0, HAVE_GTHREAD=yes, HAVE_GTHREAD=no)
if test "x$HAVE_GTHREAD" = "xno"; then
AC_MSG_ERROR([Must have gthread-2.0 installed])
fi
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)
# Have gobject?
PKG_CHECK_MODULES(GOBJECT, gobject-2.0, HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
if test "x$HAVE_GOBJECT" = "xno"; then
AC_MSG_ERROR([Must have gobject-2.0 installed])
fi
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_LIBS)
# Have gdkpixbuf?
PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0, HAVE_GDKPIXBUF=yes, HAVE_GDKPIXBUF=no)
if test x"$HAVE_GDKPIXBUF" = "xyes"; then
AC_DEFINE(HAVE_GDKPIXBUF, 1, [Define if gdk-pixbuf support is enabled])
else
AC_MSG_WARN([Gdk-pixbuf library not present; now-playing artwork might be affected])
fi
AM_CONDITIONAL(USE_GDKPIXBUF, test x"$HAVE_GDKPIXBUF" = "xyes")
AC_SUBST(GDKPIXBUF_CFLAGS)
AC_SUBST(GDKPIXBUF_LIBS)
# Have libsoup?
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.48.0, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
if test x"$HAVE_LIBSOUP" = "xno"; then
AC_MSG_ERROR([Must have libsoup installed])
fi
AC_SUBST(SOUP_CFLAGS)
AC_SUBST(SOUP_LIBS)
# Have GTK3?
PKG_CHECK_MODULES(GTK, gtk+-3.0, HAVE_GTK=yes, HAVE_GTK=no)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
# Have libgee?
PKG_CHECK_MODULES(GEE, gee-0.8, HAVE_GEE=yes, HAVE_GEE=no)
AC_SUBST(GEE_CFLAGS)
AC_SUBST(GEE_LIBS)
# Have gstreamer-app?
PKG_CHECK_MODULES(
GSTREAMERAPP,
gstreamer-app-1.0
gstreamer-plugins-base-1.0 >= 0.10.23.2,
HAVE_GSTREAMERAPP=yes,
HAVE_GSTREAMERAPP=no
)
if test x"$HAVE_GSTREAMERAPP" = "xyes"; then
AC_DEFINE(HAVE_GSTREAMERAPP, 1, [Define if GStreamer App support is enabled])
GSTLIB="gstreamer-1.0 gstreamer-app-1.0"
AC_SUBST(GSTLIB)
else
AC_MSG_WARN([GStreamer app element not present; transcoding will not be supported])
fi
AM_CONDITIONAL(USE_GSTREAMERAPP, test x"$HAVE_GSTREAMERAPP" = "xyes")
AC_SUBST(GSTREAMERAPP_CFLAGS)
AC_SUBST(GSTREAMERAPP_LIBS)
# Have Vala compiler?
AM_PROG_VALAC([0.11.4])
AM_CONDITIONAL(HAVE_VALAC, test -x "$VALAC")
# Have vala-gen-introspect?
AC_PATH_PROG(VALA_GEN_INTROSPECT, vala-gen-introspect)
AC_PATH_PROG(VAPIGEN, vapigen)
AM_CONDITIONAL(BUILD_VAPI, test -n "$VALA_GEN_INTROSPECT" -a -n "$VAPIGEN" -a xyes = x"$found_introspection")
if ! test -n "$VALA_GEN_INTROSPECT" -a -n "$VAPIGEN" -a xyes = x"$found_introspection"; then
AC_MSG_WARN([Will not build vapi])
fi
AM_CONDITIONAL(BUILD_VALATESTS, test -x "$VALAC" -a "x$HAVE_GEE" = "xyes")
if test -n "$BUILD_VALATESTS" ; then
AC_MSG_WARN([Will not build Vala tests])
fi
AM_CONDITIONAL(BUILD_DPAPVIEW, test -x "$VALAC" -a "x$HAVE_GEE" = "xyes" -a "x$HAVE_GTK" = "xyes")
if test -n "$BUILD_DPAPVIEW" ; then
AC_MSG_WARN([Will not build dpapview])
fi
if test x${as_cv_unaligned_access} = xyes ; then
DMAP_HAVE_UNALIGNED_ACCESS_DEFINE="#define DMAP_HAVE_UNALIGNED_ACCESS 1"
else
DMAP_HAVE_UNALIGNED_ACCESS_DEFINE="#define DMAP_HAVE_UNALIGNED_ACCESS 0"
fi
AC_SUBST(DMAP_HAVE_UNALIGNED_ACCESS_DEFINE)
# Select mDNS library.
AC_ARG_WITH(
mdns,
AC_HELP_STRING([--with-mdns=auto|avahi|dns_sd],
[Select the mDNS/DNS-SD implementation to use (default auto)]),
WITH_MDNS=$withval,
WITH_MDNS=auto
)
HAVE_AVAHI=no
HAVE_DNS_SD=no # Apple's DNSSD library.
USE_AVAHI=no
USE_DNS_SD=no
if test x"$WITH_MDNS" = xauto || test x"$WITH_MDNS" = xavahi; then
PKG_CHECK_MODULES(
AVAHI,
avahi-client >= 0.6
avahi-glib >= 0.6,
HAVE_AVAHI=yes,
HAVE_AVAHI=no
)
fi
if test x"$HAVE_AVAHI" = xno; then
if test x"$WITH_MDNS" = xauto || test x"$WITH_MDNS" = xdns_sd; then
AC_CHECK_HEADERS(dns_sd.h, HAVE_DNS_SD=yes)
if test x"$HAVE_DNS_SD" = xyes; then
AC_CHECK_LIB(dns_sd, DNSServiceRegister, DNS_SD_LIBS="-ldns_sd",)
fi
fi
fi
if test x"$WITH_MDNS" = xauto; then
if test x"$HAVE_AVAHI" = xyes; then
MDNS_CFLAGS=$AVAHI_CFLAGS
MDNS_LIBS=$AVAHI_LIBS
USE_AVAHI=yes
AC_MSG_NOTICE([Detected Avahi; using it for mDNS/DNS-SD])
elif test x"$HAVE_DNS_SD" = xyes; then
MDNS_CFLAGS=$DNS_SD_CFLAGS
MDNS_LIBS=$DNS_SD_LIBS
USE_DNS_SD=yes
AC_MSG_NOTICE([Detected Apple's DNSSD; using it for mDNS/DNS-SD])
else
AC_MSG_ERROR([Must have avahi or dns_sd.h development files installed])
fi
elif test x"$WITH_MDNS" = xavahi; then
if test x"$HAVE_AVAHI" = xno; then
AC_MSG_ERROR([Avahi explicitly requested but not found. Install Avahi, or try --with-mdns=dns_sd])
fi
MDNS_CFLAGS=$AVAHI_CFLAGS
MDNS_LIBS=$AVAHI_LIBS
USE_AVAHI=yes
AC_MSG_NOTICE([Using Avahi for mDNS/DNS-SD])
elif test x"$WITH_MDNS" = xdns_sd; then
if test x"$HAVE_DNS_SD" = xno; then
AC_MSG_ERROR([Apple DNSSD explicitly requested but not found. Install Apple DNSSD, or try --with-mdns=avahi])
fi
MDNS_CFLAGS=$DNS_SD_CFLAGS
MDNS_LIBS=$DNS_SD_LIBS
USE_DNS_SD=yes
AC_MSG_NOTICE([Using Apple's DNSSD for mDNS/DNS-SD])
fi
AM_CONDITIONAL(USE_AVAHI, test "x$USE_AVAHI" = "xyes")
AM_CONDITIONAL(USE_DNS_SD, test "x$USE_DNS_SD" = "xyes")
AC_SUBST(MDNS_CFLAGS)
AC_SUBST(MDNS_LIBS)
# Enable silent build when available (Automake 1.11)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([
Makefile
doc/Makefile
libdmapsharing-${API_VERSION}-uninstalled.pc
libdmapsharing-${API_VERSION}.pc
libdmapsharing/Makefile
libdmapsharing/dmap-config.h
tests/Makefile
m4/Makefile
media/Makefile
vala/Makefile
vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files
vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files
])
AC_OUTPUT
libdmapsharing-2.9.41/gtk-doc.make 0000644 0002115 0001752 00000025040 13274340031 013677 0000000 0000000 # -*- mode: makefile -*-
#
# gtk-doc.make - make rules for gtk-doc
# Copyright (C) 2003 James Henstridge
# 2004-2007 Damon Chaplin
# 2007-2017 Stefan Sauer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
####################################
# Everything below here is generic #
####################################
if GTK_DOC_USE_LIBTOOL
GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
GTKDOC_RUN = $(LIBTOOL) --mode=execute
else
GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
GTKDOC_RUN =
endif
# We set GPATH here; this gives us semantics for GNU make
# which are more like other make's VPATH, when it comes to
# whether a source that is a target of one rule is then
# searched for in VPATH/GPATH.
#
GPATH = $(srcdir)
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
SETUP_FILES = \
$(content_files) \
$(expand_content_files) \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt
EXTRA_DIST = \
$(HTML_IMAGES) \
$(SETUP_FILES)
DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
html-build.stamp pdf-build.stamp \
sgml.stamp html.stamp pdf.stamp
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals
REPORT_FILES = \
$(DOC_MODULE)-undocumented.txt \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-unused.txt
gtkdoc-check.test: Makefile
$(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
chmod +x $@
CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
if GTK_DOC_BUILD_HTML
HTML_BUILD_STAMP=html-build.stamp
else
HTML_BUILD_STAMP=
endif
if GTK_DOC_BUILD_PDF
PDF_BUILD_STAMP=pdf-build.stamp
else
PDF_BUILD_STAMP=
endif
all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
.PHONY: all-gtk-doc
if ENABLE_GTK_DOC
all-local: all-gtk-doc
endif
docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
$(REPORT_FILES): sgml-build.stamp
#### setup ####
GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@)
GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@)
GTK_DOC_V_SETUP_0=@echo " DOC Preparing build";
setup-build.stamp:
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
if test "x$$files" != "x" ; then \
for file in $$files ; do \
destdir=`dirname $(abs_builddir)/$$file`; \
test -d "$$destdir" || mkdir -p "$$destdir"; \
test -f $(abs_srcdir)/$$file && \
cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
done; \
fi; \
fi
$(AM_V_at)touch setup-build.stamp
#### scan ####
GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@)
GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@)
GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files";
GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@)
GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@)
GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects";
scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
$(GTK_DOC_V_SCAN)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
$(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
scanobj_options=""; \
gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
scanobj_options="--verbose"; \
fi; \
fi; \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
else \
for i in $(SCANOBJ_FILES) ; do \
test -f $$i || touch $$i ; \
done \
fi
$(AM_V_at)touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### xml ####
GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@)
GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@)
GTK_DOC_V_XML_0=@echo " DOC Building XML";
sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent
$(GTK_DOC_V_XML)_source_dir='' ; \
for i in $(DOC_SOURCE_DIR) ; do \
_source_dir="$${_source_dir} --source-dir=$$i" ; \
done ; \
gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
$(AM_V_at)touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@true
$(DOC_MAIN_SGML_FILE): sgml-build.stamp
@true
xml/gtkdocentities.ent: Makefile
$(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \
echo ""; \
echo ""; \
echo ""; \
echo ""; \
echo ""; \
echo ""; \
echo ""; \
) > $@
#### html ####
GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@)
GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@)
GTK_DOC_V_HTML_0=@echo " DOC Building HTML";
GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@)
GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@)
GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
mkhtml_options=""; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
mkhtml_options="$$mkhtml_options --verbose"; \
fi; \
fi; \
gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
if test "$$?" = "0"; then \
mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
fi; \
cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-@test "x$(HTML_IMAGES)" = "x" || \
for file in $(HTML_IMAGES) ; do \
test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \
test -f $$file && cp $$file $(abs_builddir)/html; \
done;
$(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
$(AM_V_at)touch html-build.stamp
#### pdf ####
GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@)
GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@)
GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
$(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
mkpdf_options=""; \
gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
if test "$$?" = "0"; then \
if test "x$(V)" = "x1"; then \
mkpdf_options="$$mkpdf_options --verbose"; \
fi; \
fi; \
if test "x$(HTML_IMAGES)" != "x"; then \
for img in $(HTML_IMAGES); do \
part=`dirname $$img`; \
echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
if test $$? != 0; then \
mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
fi; \
done; \
fi; \
gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
$(AM_V_at)touch pdf-build.stamp
##############
clean-local:
@rm -f *~ *.bak
@rm -rf .libs
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
rm -f $(DOC_MODULE).types; \
fi
@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
rm -f $(DOC_MODULE)-sections.txt; \
fi
distclean-local:
@rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
$(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
rm -f $(SETUP_FILES) $(DOC_MODULE).types; \
fi
maintainer-clean-local:
@rm -rf xml html
install-data-local:
@installfiles=`echo $(builddir)/html/*`; \
if test "$$installfiles" = '$(builddir)/html/*'; \
then echo 1>&2 'Nothing to install' ; \
else \
if test -n "$(DOC_MODULE_VERSION)"; then \
installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
else \
installdir="$(DESTDIR)$(TARGET_DIR)"; \
fi; \
$(mkinstalldirs) $${installdir} ; \
for i in $$installfiles; do \
echo ' $(INSTALL_DATA) '$$i ; \
$(INSTALL_DATA) $$i $${installdir}; \
done; \
if test -n "$(DOC_MODULE_VERSION)"; then \
mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
$${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
fi; \
$(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
fi
uninstall-local:
@if test -n "$(DOC_MODULE_VERSION)"; then \
installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
else \
installdir="$(DESTDIR)$(TARGET_DIR)"; \
fi; \
rm -rf $${installdir}
#
# Require gtk-doc when making dist
#
if HAVE_GTK_DOC
dist-check-gtkdoc: docs
else
dist-check-gtkdoc:
@echo "*** gtk-doc is needed to run 'make dist'. ***"
@echo "*** gtk-doc was not found when 'configure' ran. ***"
@echo "*** please install gtk-doc and rerun 'configure'. ***"
@false
endif
dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
@mkdir $(distdir)/html
@cp ./html/* $(distdir)/html
@-cp ./$(DOC_MODULE).pdf $(distdir)/
@-cp ./$(DOC_MODULE).types $(distdir)/
@-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
@cd $(distdir) && rm -f $(DISTCLEANFILES)
@$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
.PHONY : dist-hook-local docs
libdmapsharing-2.9.41/aclocal.m4 0000644 0002115 0001752 00000160177 13701471254 013372 0000000 0000000 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 11 (pkg-config-0.29.1)
dnl Copyright © 2004 Scott James Remnant .
dnl Copyright © 2012-2015 Dan Nicholson
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see .])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE([dependency-tracking], [dnl
AS_HELP_STRING(
[--enable-dependency-tracking],
[do not reject slow dependency extractors])
AS_HELP_STRING(
[--disable-dependency-tracking],
[speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
# TODO: see whether this extra hack can be removed once we start
# requiring Autoconf 2.70 or later.
AS_CASE([$CONFIG_FILES],
[*\'*], [eval set x "$CONFIG_FILES"],
[*], [set x $CONFIG_FILES])
shift
# Used to flag and report bootstrapping failures.
am_rc=0
for am_mf
do
# Strip MF so we end up with the name of the file.
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile which includes
# dependency-tracking related rules and includes.
# Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|| continue
am_dirpart=`AS_DIRNAME(["$am_mf"])`
am_filepart=`AS_BASENAME(["$am_mf"])`
AM_RUN_LOG([cd "$am_dirpart" \
&& sed -e '/# am--include-marker/d' "$am_filepart" \
| $MAKE -f - am--depfiles]) || am_rc=$?
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
AS_UNSET([am_dirpart])
AS_UNSET([am_filepart])
AS_UNSET([am_mf])
AS_UNSET([am_rc])
rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking is enabled.
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
[$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
AM_MISSING_PROG([AUTOCONF], [autoconf])
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
AM_MISSING_PROG([AUTOHEADER], [autoheader])
AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
#
#
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
[m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES([CXX])],
[m4_define([AC_PROG_CXX],
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard:
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: .
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MAKE_INCLUDE()
# -----------------
# Check whether make has an 'include' directive that can support all
# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
cat > confinc.mk << 'END'
am__doit:
@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
am__include="#"
am__quote=
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
AS_CASE([$?:`cat confinc.out 2>/dev/null`],
['0:this is the am__doit target'],
[AS_CASE([$s],
[BSD], [am__include='.include' am__quote='"'],
[am__include='include' am__quote=''])])
if test "$am__include" != "#"; then
_am_result="yes ($s style)"
break
fi
done
rm -f confinc.* confmf.*
AC_MSG_RESULT([${_am_result}])
AC_SUBST([am__include])])
AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it is modern enough.
# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
fi
])
# -*- Autoconf -*-
# Obsolete and "removed" macros, that must however still report explicit
# error messages when used, to smooth transition.
#
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
AC_CONFIG_HEADERS($@)])
AC_DEFUN([AM_PROG_CC_STDC],
[AC_PROG_CC
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
You should simply use the 'AC][_PROG_CC' macro instead.
Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
but upon 'ac_cv_prog_cc_stdc'.])])
AC_DEFUN([AM_C_PROTOTYPES],
[AC_FATAL([automatic de-ANSI-fication support has been removed])])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
if test "$[2]" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT([yes])
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
AC_MSG_RESULT([done])])
rm -f conftest.file
])
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
case $enable_silent_rules in @%:@ (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
dnl See automake bug#9928 and bug#10237.
am_make=${MAKE-make}
AC_CACHE_CHECK([whether $am_make supports nested variables],
[am_cv_make_support_nested_variables],
[if AS_ECHO([['TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1],
[ustar],
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
# There is notably a 21 bits limit for the UID and the GID. In fact,
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
# and bug#13588).
am_max_uid=2097151 # 2^21 - 1
am_max_gid=$am_max_uid
# The $UID and $GID variables are not portable, so we need to resort
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
# below are definitely unexpected, so allow the users to see them
# (that is, avoid stderr redirection).
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
if test $am_uid -le $am_max_uid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
if test $am_gid -le $am_max_gid; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
fi],
[pax],
[],
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Go ahead even if we have the value already cached. We do so because we
# need to set the values for the 'am__tar' and 'am__untar' variables.
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
for _am_tool in $_am_tools; do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar; do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works.
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
# Autoconf support for the Vala compiler
# Copyright (C) 2008-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Check whether the Vala compiler exists in $PATH. If it is found, the
# variable VALAC is set pointing to its absolute path. Otherwise, it is
# simply set to 'valac'.
# Optionally a minimum release number of the compiler can be requested.
# If the ACTION-IF-FOUND parameter is given, it will be run if a proper
# Vala compiler is found.
# Similarly, if the ACTION-IF-FOUND is given, it will be run if no proper
# Vala compiler is found. It defaults to simply print a warning about the
# situation, but otherwise proceeding with the configuration.
#
# AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------------------------
AC_DEFUN([AM_PROG_VALAC],
[AC_PATH_PROG([VALAC], [valac], [valac])
AS_IF([test "$VALAC" != valac && test -n "$1"],
[AC_MSG_CHECKING([whether $VALAC is at least version $1])
am__vala_version=`$VALAC --version | sed 's/Vala *//'`
AS_VERSION_COMPARE([$1], ["$am__vala_version"],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
VALAC=valac])])
if test "$VALAC" = valac; then
m4_default([$3],
[AC_MSG_WARN([no proper vala compiler found])
AC_MSG_WARN([you will not be able to compile vala source files])])
else
m4_default([$2], [:])
fi])
m4_include([m4/as-compiler-flag.m4])
m4_include([m4/gtk-doc.m4])
m4_include([m4/introspection.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
libdmapsharing-2.9.41/tests/ 0000755 0002115 0001752 00000000000 13701471354 012741 5 0000000 0000000 libdmapsharing-2.9.41/tests/vala-dmap-db.c 0000644 0002115 0001752 00000023221 13701471324 015247 0000000 0000000 /* vala-dmap-db.c generated by valac 0.48.6, the Vala compiler
* generated from vala-dmap-db.vala, do not modify */
/* FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
typedef struct _ValaDMAPDb ValaDMAPDb;
typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
typedef struct _ValaDMAPDbPrivate ValaDMAPDbPrivate;
enum {
VALA_DMAP_DB_0_PROPERTY,
VALA_DMAP_DB_NUM_PROPERTIES
};
static GParamSpec* vala_dmap_db_properties[VALA_DMAP_DB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
struct _ValaDMAPDb {
GObject parent_instance;
ValaDMAPDbPrivate * priv;
};
struct _ValaDMAPDbClass {
GObjectClass parent_class;
};
struct _ValaDMAPDbPrivate {
GeeArrayList* db;
};
static gint ValaDMAPDb_private_offset;
static gpointer vala_dmap_db_parent_class = NULL;
static DMAPDbIface * vala_dmap_db_dmap_db_parent_iface = NULL;
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
static guint vala_dmap_db_real_add (DMAPDb* base,
DMAPRecord* record);
static guint vala_dmap_db_real_add_path (DMAPDb* base,
const gchar* path);
static guint vala_dmap_db_real_add_with_id (DMAPDb* base,
DMAPRecord* record,
guint id);
static gint64 vala_dmap_db_real_count (DMAPDb* base);
static void vala_dmap_db_real_foreach (DMAPDb* base,
GHFunc func,
gpointer func_target);
static DMAPRecord* vala_dmap_db_real_lookup_by_id (DMAPDb* base,
guint id);
static guint vala_dmap_db_real_lookup_id_by_location (DMAPDb* base,
const gchar* location);
ValaDMAPDb* vala_dmap_db_new (void);
ValaDMAPDb* vala_dmap_db_construct (GType object_type);
static void vala_dmap_db_finalize (GObject * obj);
static GType vala_dmap_db_get_type_once (void);
static inline gpointer
vala_dmap_db_get_instance_private (ValaDMAPDb* self)
{
return G_STRUCT_MEMBER_P (self, ValaDMAPDb_private_offset);
}
static guint
vala_dmap_db_real_add (DMAPDb* base,
DMAPRecord* record)
{
ValaDMAPDb * self;
GeeArrayList* _tmp0_;
GeeArrayList* _tmp1_;
gint _tmp2_;
gint _tmp3_;
guint result = 0U;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (record != NULL, 0U);
_tmp0_ = self->priv->db;
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, G_TYPE_CHECK_INSTANCE_CAST (record, DMAP_TYPE_RECORD, DMAPRecord));
_tmp1_ = self->priv->db;
_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
_tmp3_ = _tmp2_;
result = (guint) _tmp3_;
return result;
}
static guint
vala_dmap_db_real_add_path (DMAPDb* base,
const gchar* path)
{
ValaDMAPDb * self;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (path != NULL, 0U);
g_error ("vala-dmap-db.vala:35: add_path not implemented");
}
static guint
vala_dmap_db_real_add_with_id (DMAPDb* base,
DMAPRecord* record,
guint id)
{
ValaDMAPDb * self;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (record != NULL, 0U);
g_error ("vala-dmap-db.vala:39: add_with_id not implemented");
}
static gint64
vala_dmap_db_real_count (DMAPDb* base)
{
ValaDMAPDb * self;
GeeArrayList* _tmp0_;
gint _tmp1_;
gint _tmp2_;
gint64 result = 0LL;
self = (ValaDMAPDb*) base;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
_tmp2_ = _tmp1_;
result = (gint64) _tmp2_;
return result;
}
static void
vala_dmap_db_real_foreach (DMAPDb* base,
GHFunc func,
gpointer func_target)
{
ValaDMAPDb * self;
gint i = 0;
self = (ValaDMAPDb*) base;
{
gboolean _tmp0_ = FALSE;
i = 0;
_tmp0_ = TRUE;
while (TRUE) {
GeeArrayList* _tmp2_;
gint _tmp3_;
gint _tmp4_;
void* _tmp5_;
GeeArrayList* _tmp6_;
gpointer _tmp7_;
if (!_tmp0_) {
gint _tmp1_;
_tmp1_ = i;
i = _tmp1_ + 1;
}
_tmp0_ = FALSE;
_tmp2_ = self->priv->db;
_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
_tmp4_ = _tmp3_;
if (!(i < _tmp4_)) {
break;
}
_tmp5_ = GINT_TO_POINTER (i + 1);
_tmp6_ = self->priv->db;
_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, i);
func (_tmp5_, (DMAPRecord*) _tmp7_, func_target);
}
}
}
static DMAPRecord*
vala_dmap_db_real_lookup_by_id (DMAPDb* base,
guint id)
{
ValaDMAPDb * self;
GeeArrayList* _tmp0_;
gpointer _tmp1_;
DMAPRecord* result = NULL;
self = (ValaDMAPDb*) base;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, ((gint) id) - 1);
result = (DMAPRecord*) _tmp1_;
return result;
}
static guint
vala_dmap_db_real_lookup_id_by_location (DMAPDb* base,
const gchar* location)
{
ValaDMAPDb * self;
self = (ValaDMAPDb*) base;
g_return_val_if_fail (location != NULL, 0U);
g_error ("vala-dmap-db.vala:63: lookup_id_by_location not implemented");
}
ValaDMAPDb*
vala_dmap_db_construct (GType object_type)
{
ValaDMAPDb * self = NULL;
self = (ValaDMAPDb*) g_object_new (object_type, NULL);
return self;
}
ValaDMAPDb*
vala_dmap_db_new (void)
{
return vala_dmap_db_construct (TYPE_VALA_DMAP_DB);
}
static void
vala_dmap_db_class_init (ValaDMAPDbClass * klass,
gpointer klass_data)
{
vala_dmap_db_parent_class = g_type_class_peek_parent (klass);
g_type_class_adjust_private_offset (klass, &ValaDMAPDb_private_offset);
G_OBJECT_CLASS (klass)->finalize = vala_dmap_db_finalize;
}
static void
vala_dmap_db_dmap_db_interface_init (DMAPDbIface * iface,
gpointer iface_data)
{
vala_dmap_db_dmap_db_parent_iface = g_type_interface_peek_parent (iface);
iface->add = (guint (*) (DMAPDb*, DMAPRecord*)) vala_dmap_db_real_add;
iface->add_path = (guint (*) (DMAPDb*, const gchar*)) vala_dmap_db_real_add_path;
iface->add_with_id = (guint (*) (DMAPDb*, DMAPRecord*, guint)) vala_dmap_db_real_add_with_id;
iface->count = (gint64 (*) (DMAPDb*)) vala_dmap_db_real_count;
iface->foreach = (void (*) (DMAPDb*, GHFunc, gpointer)) vala_dmap_db_real_foreach;
iface->lookup_by_id = (DMAPRecord* (*) (DMAPDb*, guint)) vala_dmap_db_real_lookup_by_id;
iface->lookup_id_by_location = (guint (*) (DMAPDb*, const gchar*)) vala_dmap_db_real_lookup_id_by_location;
}
static void
vala_dmap_db_instance_init (ValaDMAPDb * self,
gpointer klass)
{
GeeArrayList* _tmp0_;
self->priv = vala_dmap_db_get_instance_private (self);
_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, NULL, NULL, NULL, NULL, NULL);
self->priv->db = _tmp0_;
}
static void
vala_dmap_db_finalize (GObject * obj)
{
ValaDMAPDb * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_DB, ValaDMAPDb);
_g_object_unref0 (self->priv->db);
G_OBJECT_CLASS (vala_dmap_db_parent_class)->finalize (obj);
}
static GType
vala_dmap_db_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPDb), 0, (GInstanceInitFunc) vala_dmap_db_instance_init, NULL };
static const GInterfaceInfo dmap_db_info = { (GInterfaceInitFunc) vala_dmap_db_dmap_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dmap_db_type_id;
vala_dmap_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDMAPDb", &g_define_type_info, 0);
g_type_add_interface_static (vala_dmap_db_type_id, DMAP_TYPE_DB, &dmap_db_info);
ValaDMAPDb_private_offset = g_type_add_instance_private (vala_dmap_db_type_id, sizeof (ValaDMAPDbPrivate));
return vala_dmap_db_type_id;
}
GType
vala_dmap_db_get_type (void)
{
static volatile gsize vala_dmap_db_type_id__volatile = 0;
if (g_once_init_enter (&vala_dmap_db_type_id__volatile)) {
GType vala_dmap_db_type_id;
vala_dmap_db_type_id = vala_dmap_db_get_type_once ();
g_once_init_leave (&vala_dmap_db_type_id__volatile, vala_dmap_db_type_id);
}
return vala_dmap_db_type_id__volatile;
}
libdmapsharing-2.9.41/tests/dmapserve.vala 0000644 0002115 0001752 00000003432 13701471120 015505 0000000 0000000 /* FILE: dmapserve.vala -- Serve media using DMAP
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class DPAPServe {
ValaDPAPRecord record;
ValaDMAPDb db;
ValaDMAPContainerDb container_db;
DPAP.Share share;
public DPAPServe () throws GLib.Error {
record = new ValaDPAPRecord ();
db = new ValaDMAPDb ();
db.add (record);
container_db = new ValaDMAPContainerDb ();
share = new DPAP.Share ("dmapserve", null, db, container_db, null);
}
}
void debug_printf (string? log_domain,
GLib.LogLevelFlags log_level,
string? message)
{
stdout.printf ("%s\n", message);
}
void debug_null (string? log_domain,
GLib.LogLevelFlags log_level,
string? message)
{
}
int main (string[] args) {
var loop = new GLib.MainLoop ();
GLib.Log.set_handler ("libdmapsharing", GLib.LogLevelFlags.LEVEL_DEBUG, debug_printf);
GLib.Log.set_handler (null, GLib.LogLevelFlags.LEVEL_DEBUG, debug_printf);
var dmapcopy = new DPAPServe ();
loop.run ();
return 0;
}
libdmapsharing-2.9.41/tests/test-dmap-server.c 0000644 0002115 0001752 00000005614 13701471120 016224 0000000 0000000 /*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "test-dmap-container-record.h"
#include "test-dmap-container-db.h"
#include "test-dmap-db.h"
/* For use when deciding whether to test DAAP or DPAP. */
enum {
DAAP,
DPAP
};
static char *
dmap_sharing_default_share_name ()
{
const gchar *real_name;
real_name = g_get_real_name ();
if (strcmp (real_name, "Unknown") == 0) {
real_name = g_get_user_name ();
}
return g_strdup_printf ("%s's Media (libdmapsharing test)", real_name);
}
static void
create_share (guint conn_type)
{
char *name = dmap_sharing_default_share_name ();
DMAPContainerRecord *dmap_container_record = \
DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
DMAPContainerDb *dmap_container_db = \
DMAP_CONTAINER_DB (test_dmap_container_db_new
(dmap_container_record));
DMAPRecordFactory *factory;
DMAPRecord *record;
DMAPShare *share = NULL;
DMAPDb *db;
if (conn_type == DAAP) {
factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
} else {
factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
}
record = DMAP_RECORD (dmap_record_factory_create (factory, NULL));
db = DMAP_DB (test_dmap_db_new ());
dmap_db_add (db, record);
g_object_unref (record);
g_warning ("initialize DAAP sharing");
if (conn_type == DAAP) {
share = DMAP_SHARE (daap_share_new (name,
NULL,
db,
dmap_container_db,
NULL));
} else {
share = DMAP_SHARE (dpap_share_new (name,
NULL,
db,
dmap_container_db,
NULL));
}
g_assert (NULL != share);
g_free (name);
}
int
main (int argc, char *argv[])
{
guint conn_type = DAAP;
static GMainLoop *loop;
if (argc == 2)
conn_type = atoi (argv[1]);
loop = g_main_loop_new (NULL, FALSE);
create_share (conn_type);
g_main_loop_run (loop);
exit(EXIT_SUCCESS);
}
libdmapsharing-2.9.41/tests/test-dmap-container-record.c 0000644 0002115 0001752 00000007577 13701471120 020166 0000000 0000000 /*
* Database record class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "test-dmap-container-record.h"
enum {
PROP_0,
PROP_NAME
};
static DMAPDb *entries = NULL;
static void
test_dmap_container_record_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id) {
case PROP_NAME:
/* NOTE: do nothing; test name is always the same. */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
test_dmap_container_record_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id) {
case PROP_NAME:
g_value_set_string (value, "Test");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
guint
test_dmap_container_record_get_id (DMAPContainerRecord *record)
{
return 2;
}
void
test_dmap_container_record_add_entry (DMAPContainerRecord *container_record,
DMAPRecord *record,
gint id)
{
}
guint64
test_dmap_container_record_get_entry_count (DMAPContainerRecord *record)
{
return 1;
}
DMAPDb *
test_dmap_container_record_get_entries (DMAPContainerRecord *record)
{
return g_object_ref (entries);
}
static void
test_dmap_container_record_init (TestDMAPContainerRecord *record)
{
entries = DMAP_DB (test_dmap_db_new ());
}
static void
test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->set_property = test_dmap_container_record_set_property;
gobject_class->get_property = test_dmap_container_record_get_property;
g_object_class_override_property (gobject_class, PROP_NAME, "name");
}
static void
test_dmap_container_record_interface_init (gpointer iface, gpointer data)
{
DMAPContainerRecordIface *dmap_container_record = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
dmap_container_record->get_id = test_dmap_container_record_get_id;
dmap_container_record->add_entry = test_dmap_container_record_add_entry;
dmap_container_record->get_entry_count = test_dmap_container_record_get_entry_count;
dmap_container_record->get_entries = test_dmap_container_record_get_entries;
}
G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerRecord, test_dmap_container_record, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_RECORD,
test_dmap_container_record_interface_init))
TestDMAPContainerRecord *test_dmap_container_record_new (void)
{
TestDMAPContainerRecord *record;
record = TEST_DMAP_CONTAINER_RECORD (g_object_new (TYPE_TEST_DMAP_CONTAINER_RECORD, NULL));
return record;
}
libdmapsharing-2.9.41/tests/test-dmap-db.h 0000644 0002115 0001752 00000003702 13701471120 015304 0000000 0000000 /*
* Database class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __TEST_DMAP_DB
#define __TEST_DMAP_DB
#include
G_BEGIN_DECLS
#define TYPE_TEST_DMAP_DB (test_dmap_db_get_type ())
#define TEST_DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
TYPE_TEST_DMAP_DB, TestDMAPDb))
#define TEST_DMAP_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_TEST_DMAP_DB, TestDMAPDbClass))
#define IS_TEST_DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_DB))
#define IS_TEST_DMAP_DB_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_DB_CLASS))
#define TEST_DMAP_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
TYPE_TEST_DMAP_DB, TestDMAPDbClass))
#define TEST_DMAP_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
TYPE_TEST_DMAP_DB, \
TestDMAPDbPrivate))
typedef struct TestDMAPDbPrivate TestDMAPDbPrivate;
typedef struct {
GObject parent;
TestDMAPDbPrivate *priv;
} TestDMAPDb;
typedef struct {
GObjectClass parent;
} TestDMAPDbClass;
TestDMAPDb *test_dmap_db_new (void);
GType test_dmap_db_get_type (void);
#endif /* __TEST_DMAP_DB */
G_END_DECLS
libdmapsharing-2.9.41/tests/vala-dpap-record.c 0000644 0002115 0001752 00000074764 13701471325 016166 0000000 0000000 /* vala-dpap-record.c generated by valac 0.48.6, the Vala compiler
* generated from vala-dpap-record.vala, do not modify */
/* FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#include
#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
typedef struct _ValaDPAPRecord ValaDPAPRecord;
typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
typedef struct _ValaDPAPRecordPrivate ValaDPAPRecordPrivate;
enum {
VALA_DPAP_RECORD_0_PROPERTY,
VALA_DPAP_RECORD_LOCATION_PROPERTY,
VALA_DPAP_RECORD_FILENAME_PROPERTY,
VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY,
VALA_DPAP_RECORD_FORMAT_PROPERTY,
VALA_DPAP_RECORD_THUMBNAIL_PROPERTY,
VALA_DPAP_RECORD_COMMENTS_PROPERTY,
VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY,
VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY,
VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY,
VALA_DPAP_RECORD_RATING_PROPERTY,
VALA_DPAP_RECORD_CREATION_DATE_PROPERTY,
VALA_DPAP_RECORD_NUM_PROPERTIES
};
static GParamSpec* vala_dpap_record_properties[VALA_DPAP_RECORD_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL)))
#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
typedef struct _ValaDPAPRecordFactoryPrivate ValaDPAPRecordFactoryPrivate;
enum {
VALA_DPAP_RECORD_FACTORY_0_PROPERTY,
VALA_DPAP_RECORD_FACTORY_NUM_PROPERTIES
};
static GParamSpec* vala_dpap_record_factory_properties[VALA_DPAP_RECORD_FACTORY_NUM_PROPERTIES];
struct _ValaDPAPRecord {
GObject parent_instance;
ValaDPAPRecordPrivate * priv;
};
struct _ValaDPAPRecordClass {
GObjectClass parent_class;
};
struct _ValaDPAPRecordPrivate {
gchar* _location;
gchar* _filename;
gchar* _aspect_ratio;
gchar* _format;
gchar* _comments;
GByteArray* _thumbnail;
gint _large_filesize;
gint _pixel_height;
gint _pixel_width;
gint _rating;
gint _creation_date;
};
struct _ValaDPAPRecordFactory {
GObject parent_instance;
ValaDPAPRecordFactoryPrivate * priv;
};
struct _ValaDPAPRecordFactoryClass {
GObjectClass parent_class;
};
static gint ValaDPAPRecord_private_offset;
static gpointer vala_dpap_record_parent_class = NULL;
static DMAPRecordIface * vala_dpap_record_dmap_record_parent_iface = NULL;
static DPAPRecordIface * vala_dpap_record_dpap_record_parent_iface = NULL;
static gpointer vala_dpap_record_factory_parent_class = NULL;
static DMAPRecordFactoryIface * vala_dpap_record_factory_dmap_record_factory_parent_iface = NULL;
GType vala_dpap_record_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
static GInputStream* vala_dpap_record_real_read (DPAPRecord* base,
GError** error);
static gboolean vala_dpap_record_real_set_from_blob (DMAPRecord* base,
GByteArray* blob);
static GByteArray* vala_dpap_record_real_to_blob (DMAPRecord* base);
ValaDPAPRecord* vala_dpap_record_new (void);
ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
void vala_dpap_record_set_location (ValaDPAPRecord* self,
const gchar* value);
const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
void vala_dpap_record_set_filename (ValaDPAPRecord* self,
const gchar* value);
const gchar* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self);
void vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self,
const gchar* value);
const gchar* vala_dpap_record_get_format (ValaDPAPRecord* self);
void vala_dpap_record_set_format (ValaDPAPRecord* self,
const gchar* value);
GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self,
GByteArray* value);
const gchar* vala_dpap_record_get_comments (ValaDPAPRecord* self);
void vala_dpap_record_set_comments (ValaDPAPRecord* self,
const gchar* value);
gint vala_dpap_record_get_large_filesize (ValaDPAPRecord* self);
void vala_dpap_record_set_large_filesize (ValaDPAPRecord* self,
gint value);
gint vala_dpap_record_get_pixel_height (ValaDPAPRecord* self);
void vala_dpap_record_set_pixel_height (ValaDPAPRecord* self,
gint value);
gint vala_dpap_record_get_pixel_width (ValaDPAPRecord* self);
void vala_dpap_record_set_pixel_width (ValaDPAPRecord* self,
gint value);
gint vala_dpap_record_get_rating (ValaDPAPRecord* self);
void vala_dpap_record_set_rating (ValaDPAPRecord* self,
gint value);
gint vala_dpap_record_get_creation_date (ValaDPAPRecord* self);
void vala_dpap_record_set_creation_date (ValaDPAPRecord* self,
gint value);
static void vala_dpap_record_finalize (GObject * obj);
static GType vala_dpap_record_get_type_once (void);
static void _vala_vala_dpap_record_get_property (GObject * object,
guint property_id,
GValue * value,
GParamSpec * pspec);
static void _vala_vala_dpap_record_set_property (GObject * object,
guint property_id,
const GValue * value,
GParamSpec * pspec);
GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
static DMAPRecord* vala_dpap_record_factory_real_create (DMAPRecordFactory* base,
void* user_data);
ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
static GType vala_dpap_record_factory_get_type_once (void);
static inline gpointer
vala_dpap_record_get_instance_private (ValaDPAPRecord* self)
{
return G_STRUCT_MEMBER_P (self, ValaDPAPRecord_private_offset);
}
static GInputStream*
vala_dpap_record_real_read (DPAPRecord* base,
GError** error)
{
ValaDPAPRecord * self;
self = (ValaDPAPRecord*) base;
g_error ("vala-dpap-record.vala:95: read not implemented");
}
static gboolean
vala_dpap_record_real_set_from_blob (DMAPRecord* base,
GByteArray* blob)
{
ValaDPAPRecord * self;
self = (ValaDPAPRecord*) base;
g_return_val_if_fail (blob != NULL, FALSE);
g_error ("vala-dpap-record.vala:99: set_from_blob not implemented");
}
static GByteArray*
vala_dpap_record_real_to_blob (DMAPRecord* base)
{
ValaDPAPRecord * self;
self = (ValaDPAPRecord*) base;
g_error ("vala-dpap-record.vala:103: to_blob not implemented");
}
ValaDPAPRecord*
vala_dpap_record_construct (GType object_type)
{
ValaDPAPRecord * self = NULL;
gchar* _tmp0_;
gchar* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
const gchar* _tmp6_;
gchar* _tmp7_;
gchar* _tmp8_;
gchar* _tmp9_;
gchar* path = NULL;
gchar* _tmp10_;
gchar* _tmp11_;
gchar* _tmp12_;
gchar* _tmp13_;
guint8* data = NULL;
gint data_length1 = 0;
gint _data_size_ = 0;
guint8* _tmp14_ = NULL;
size_t _tmp15_ = 0;
GByteArray* _tmp16_;
GByteArray* _tmp17_;
GError* _inner_error0_ = NULL;
self = (ValaDPAPRecord*) g_object_new (object_type, NULL);
_tmp0_ = g_get_current_dir ();
_tmp1_ = _tmp0_;
_tmp2_ = g_strconcat ("file://", _tmp1_, NULL);
_tmp3_ = _tmp2_;
_tmp4_ = g_strconcat (_tmp3_, "/media/test.jpeg", NULL);
_g_free0 (self->priv->_location);
self->priv->_location = _tmp4_;
_g_free0 (_tmp3_);
_g_free0 (_tmp1_);
_tmp5_ = g_strdup ("1.333");
_g_free0 (self->priv->_aspect_ratio);
self->priv->_aspect_ratio = _tmp5_;
_tmp6_ = self->priv->_location;
_tmp7_ = g_path_get_basename (_tmp6_);
_g_free0 (self->priv->_filename);
self->priv->_filename = _tmp7_;
_tmp8_ = g_strdup ("JPEG");
_g_free0 (self->priv->_format);
self->priv->_format = _tmp8_;
_tmp9_ = g_strdup ("Comments");
_g_free0 (self->priv->_comments);
self->priv->_comments = _tmp9_;
self->priv->_large_filesize = 13953;
self->priv->_pixel_height = 480;
self->priv->_pixel_width = 640;
self->priv->_rating = 5;
self->priv->_creation_date = 0;
_tmp10_ = g_get_current_dir ();
_tmp11_ = _tmp10_;
_tmp12_ = g_strconcat (_tmp11_, "/media/test.jpeg", NULL);
_tmp13_ = _tmp12_;
_g_free0 (_tmp11_);
path = _tmp13_;
g_file_get_contents (path, (gchar**) (&_tmp14_), &_tmp15_, &_inner_error0_);
data = (g_free (data), NULL);
data = _tmp14_;
data_length1 = _tmp15_;
_data_size_ = data_length1;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
data = (g_free (data), NULL);
_g_free0 (path);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return NULL;
}
_tmp16_ = g_byte_array_new ();
_g_byte_array_unref0 (self->priv->_thumbnail);
self->priv->_thumbnail = _tmp16_;
_tmp17_ = self->priv->_thumbnail;
g_byte_array_append (_tmp17_, data, (gint) data_length1);
data = (g_free (data), NULL);
_g_free0 (path);
return self;
}
ValaDPAPRecord*
vala_dpap_record_new (void)
{
return vala_dpap_record_construct (TYPE_VALA_DPAP_RECORD);
}
const gchar*
vala_dpap_record_get_location (ValaDPAPRecord* self)
{
const gchar* result;
const gchar* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_location;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_location (ValaDPAPRecord* self,
const gchar* value)
{
gchar* _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
_g_free0 (self->priv->_location);
self->priv->_location = _tmp0_;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_LOCATION_PROPERTY]);
}
const gchar*
vala_dpap_record_get_filename (ValaDPAPRecord* self)
{
const gchar* result;
const gchar* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_filename;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_filename (ValaDPAPRecord* self,
const gchar* value)
{
gchar* _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
_g_free0 (self->priv->_filename);
self->priv->_filename = _tmp0_;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_FILENAME_PROPERTY]);
}
const gchar*
vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self)
{
const gchar* result;
const gchar* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_aspect_ratio;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self,
const gchar* value)
{
gchar* _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
_g_free0 (self->priv->_aspect_ratio);
self->priv->_aspect_ratio = _tmp0_;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY]);
}
const gchar*
vala_dpap_record_get_format (ValaDPAPRecord* self)
{
const gchar* result;
const gchar* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_format;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_format (ValaDPAPRecord* self,
const gchar* value)
{
gchar* _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
_g_free0 (self->priv->_format);
self->priv->_format = _tmp0_;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_FORMAT_PROPERTY]);
}
GByteArray*
vala_dpap_record_get_thumbnail (ValaDPAPRecord* self)
{
GByteArray* result;
GByteArray* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_thumbnail;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_thumbnail (ValaDPAPRecord* self,
GByteArray* value)
{
GByteArray* _tmp0_;
GByteArray* _tmp1_;
guint8* _tmp2_;
gint _tmp2__length1;
g_return_if_fail (self != NULL);
_tmp0_ = g_byte_array_new ();
_g_byte_array_unref0 (self->priv->_thumbnail);
self->priv->_thumbnail = _tmp0_;
_tmp1_ = self->priv->_thumbnail;
_tmp2_ = value->data;
_tmp2__length1 = value->len;
g_byte_array_append (_tmp1_, _tmp2_, (gint) _tmp2__length1);
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_THUMBNAIL_PROPERTY]);
}
const gchar*
vala_dpap_record_get_comments (ValaDPAPRecord* self)
{
const gchar* result;
const gchar* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_comments;
result = _tmp0_;
return result;
}
void
vala_dpap_record_set_comments (ValaDPAPRecord* self,
const gchar* value)
{
gchar* _tmp0_;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (value);
_g_free0 (self->priv->_comments);
self->priv->_comments = _tmp0_;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_COMMENTS_PROPERTY]);
}
gint
vala_dpap_record_get_large_filesize (ValaDPAPRecord* self)
{
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_large_filesize;
return result;
}
void
vala_dpap_record_set_large_filesize (ValaDPAPRecord* self,
gint value)
{
g_return_if_fail (self != NULL);
self->priv->_large_filesize = value;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY]);
}
gint
vala_dpap_record_get_pixel_height (ValaDPAPRecord* self)
{
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_pixel_height;
return result;
}
void
vala_dpap_record_set_pixel_height (ValaDPAPRecord* self,
gint value)
{
g_return_if_fail (self != NULL);
self->priv->_pixel_height = value;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY]);
}
gint
vala_dpap_record_get_pixel_width (ValaDPAPRecord* self)
{
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_pixel_width;
return result;
}
void
vala_dpap_record_set_pixel_width (ValaDPAPRecord* self,
gint value)
{
g_return_if_fail (self != NULL);
self->priv->_pixel_width = value;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY]);
}
gint
vala_dpap_record_get_rating (ValaDPAPRecord* self)
{
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_rating;
return result;
}
void
vala_dpap_record_set_rating (ValaDPAPRecord* self,
gint value)
{
g_return_if_fail (self != NULL);
self->priv->_rating = value;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_RATING_PROPERTY]);
}
gint
vala_dpap_record_get_creation_date (ValaDPAPRecord* self)
{
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_creation_date;
return result;
}
void
vala_dpap_record_set_creation_date (ValaDPAPRecord* self,
gint value)
{
g_return_if_fail (self != NULL);
self->priv->_creation_date = value;
g_object_notify_by_pspec ((GObject *) self, vala_dpap_record_properties[VALA_DPAP_RECORD_CREATION_DATE_PROPERTY]);
}
static void
vala_dpap_record_class_init (ValaDPAPRecordClass * klass,
gpointer klass_data)
{
vala_dpap_record_parent_class = g_type_class_peek_parent (klass);
g_type_class_adjust_private_offset (klass, &ValaDPAPRecord_private_offset);
G_OBJECT_CLASS (klass)->get_property = _vala_vala_dpap_record_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_vala_dpap_record_set_property;
G_OBJECT_CLASS (klass)->finalize = vala_dpap_record_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LOCATION_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_LOCATION_PROPERTY] = g_param_spec_string ("location", "location", "location", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FILENAME_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_FILENAME_PROPERTY] = g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY] = g_param_spec_string ("aspect-ratio", "aspect-ratio", "aspect-ratio", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FORMAT_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_FORMAT_PROPERTY] = g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_THUMBNAIL_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_THUMBNAIL_PROPERTY] = g_param_spec_boxed ("thumbnail", "thumbnail", "thumbnail", G_TYPE_BYTE_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_COMMENTS_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_COMMENTS_PROPERTY] = g_param_spec_string ("comments", "comments", "comments", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY] = g_param_spec_int ("large-filesize", "large-filesize", "large-filesize", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY] = g_param_spec_int ("pixel-height", "pixel-height", "pixel-height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY] = g_param_spec_int ("pixel-width", "pixel-width", "pixel-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_RATING_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_RATING_PROPERTY] = g_param_spec_int ("rating", "rating", "rating", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_CREATION_DATE_PROPERTY, vala_dpap_record_properties[VALA_DPAP_RECORD_CREATION_DATE_PROPERTY] = g_param_spec_int ("creation-date", "creation-date", "creation-date", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}
static void
vala_dpap_record_dmap_record_interface_init (DMAPRecordIface * iface,
gpointer iface_data)
{
vala_dpap_record_dmap_record_parent_iface = g_type_interface_peek_parent (iface);
iface->set_from_blob = (gboolean (*) (DMAPRecord*, GByteArray*)) vala_dpap_record_real_set_from_blob;
iface->to_blob = (GByteArray* (*) (DMAPRecord*)) vala_dpap_record_real_to_blob;
}
static void
vala_dpap_record_dpap_record_interface_init (DPAPRecordIface * iface,
gpointer iface_data)
{
vala_dpap_record_dpap_record_parent_iface = g_type_interface_peek_parent (iface);
iface->read = (GInputStream* (*) (DPAPRecord*, GError**)) vala_dpap_record_real_read;
}
static void
vala_dpap_record_instance_init (ValaDPAPRecord * self,
gpointer klass)
{
self->priv = vala_dpap_record_get_instance_private (self);
}
static void
vala_dpap_record_finalize (GObject * obj)
{
ValaDPAPRecord * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
_g_free0 (self->priv->_location);
_g_free0 (self->priv->_filename);
_g_free0 (self->priv->_aspect_ratio);
_g_free0 (self->priv->_format);
_g_free0 (self->priv->_comments);
_g_byte_array_unref0 (self->priv->_thumbnail);
G_OBJECT_CLASS (vala_dpap_record_parent_class)->finalize (obj);
}
static GType
vala_dpap_record_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecord), 0, (GInstanceInitFunc) vala_dpap_record_instance_init, NULL };
static const GInterfaceInfo dmap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dmap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
static const GInterfaceInfo dpap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dpap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dpap_record_type_id;
vala_dpap_record_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecord", &g_define_type_info, 0);
g_type_add_interface_static (vala_dpap_record_type_id, DMAP_TYPE_RECORD, &dmap_record_info);
g_type_add_interface_static (vala_dpap_record_type_id, DPAP_TYPE_RECORD, &dpap_record_info);
ValaDPAPRecord_private_offset = g_type_add_instance_private (vala_dpap_record_type_id, sizeof (ValaDPAPRecordPrivate));
return vala_dpap_record_type_id;
}
GType
vala_dpap_record_get_type (void)
{
static volatile gsize vala_dpap_record_type_id__volatile = 0;
if (g_once_init_enter (&vala_dpap_record_type_id__volatile)) {
GType vala_dpap_record_type_id;
vala_dpap_record_type_id = vala_dpap_record_get_type_once ();
g_once_init_leave (&vala_dpap_record_type_id__volatile, vala_dpap_record_type_id);
}
return vala_dpap_record_type_id__volatile;
}
static void
_vala_vala_dpap_record_get_property (GObject * object,
guint property_id,
GValue * value,
GParamSpec * pspec)
{
ValaDPAPRecord * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
switch (property_id) {
case VALA_DPAP_RECORD_LOCATION_PROPERTY:
g_value_set_string (value, vala_dpap_record_get_location (self));
break;
case VALA_DPAP_RECORD_FILENAME_PROPERTY:
g_value_set_string (value, vala_dpap_record_get_filename (self));
break;
case VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY:
g_value_set_string (value, vala_dpap_record_get_aspect_ratio (self));
break;
case VALA_DPAP_RECORD_FORMAT_PROPERTY:
g_value_set_string (value, vala_dpap_record_get_format (self));
break;
case VALA_DPAP_RECORD_THUMBNAIL_PROPERTY:
g_value_set_boxed (value, vala_dpap_record_get_thumbnail (self));
break;
case VALA_DPAP_RECORD_COMMENTS_PROPERTY:
g_value_set_string (value, vala_dpap_record_get_comments (self));
break;
case VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY:
g_value_set_int (value, vala_dpap_record_get_large_filesize (self));
break;
case VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY:
g_value_set_int (value, vala_dpap_record_get_pixel_height (self));
break;
case VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY:
g_value_set_int (value, vala_dpap_record_get_pixel_width (self));
break;
case VALA_DPAP_RECORD_RATING_PROPERTY:
g_value_set_int (value, vala_dpap_record_get_rating (self));
break;
case VALA_DPAP_RECORD_CREATION_DATE_PROPERTY:
g_value_set_int (value, vala_dpap_record_get_creation_date (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
_vala_vala_dpap_record_set_property (GObject * object,
guint property_id,
const GValue * value,
GParamSpec * pspec)
{
ValaDPAPRecord * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord);
switch (property_id) {
case VALA_DPAP_RECORD_LOCATION_PROPERTY:
vala_dpap_record_set_location (self, g_value_get_string (value));
break;
case VALA_DPAP_RECORD_FILENAME_PROPERTY:
vala_dpap_record_set_filename (self, g_value_get_string (value));
break;
case VALA_DPAP_RECORD_ASPECT_RATIO_PROPERTY:
vala_dpap_record_set_aspect_ratio (self, g_value_get_string (value));
break;
case VALA_DPAP_RECORD_FORMAT_PROPERTY:
vala_dpap_record_set_format (self, g_value_get_string (value));
break;
case VALA_DPAP_RECORD_THUMBNAIL_PROPERTY:
vala_dpap_record_set_thumbnail (self, g_value_get_boxed (value));
break;
case VALA_DPAP_RECORD_COMMENTS_PROPERTY:
vala_dpap_record_set_comments (self, g_value_get_string (value));
break;
case VALA_DPAP_RECORD_LARGE_FILESIZE_PROPERTY:
vala_dpap_record_set_large_filesize (self, g_value_get_int (value));
break;
case VALA_DPAP_RECORD_PIXEL_HEIGHT_PROPERTY:
vala_dpap_record_set_pixel_height (self, g_value_get_int (value));
break;
case VALA_DPAP_RECORD_PIXEL_WIDTH_PROPERTY:
vala_dpap_record_set_pixel_width (self, g_value_get_int (value));
break;
case VALA_DPAP_RECORD_RATING_PROPERTY:
vala_dpap_record_set_rating (self, g_value_get_int (value));
break;
case VALA_DPAP_RECORD_CREATION_DATE_PROPERTY:
vala_dpap_record_set_creation_date (self, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static DMAPRecord*
vala_dpap_record_factory_real_create (DMAPRecordFactory* base,
void* user_data)
{
ValaDPAPRecordFactory * self;
ValaDPAPRecord* _tmp0_;
DMAPRecord* result = NULL;
self = (ValaDPAPRecordFactory*) base;
_tmp0_ = vala_dpap_record_new ();
result = (DMAPRecord*) _tmp0_;
return result;
}
ValaDPAPRecordFactory*
vala_dpap_record_factory_construct (GType object_type)
{
ValaDPAPRecordFactory * self = NULL;
self = (ValaDPAPRecordFactory*) g_object_new (object_type, NULL);
return self;
}
ValaDPAPRecordFactory*
vala_dpap_record_factory_new (void)
{
return vala_dpap_record_factory_construct (TYPE_VALA_DPAP_RECORD_FACTORY);
}
static void
vala_dpap_record_factory_class_init (ValaDPAPRecordFactoryClass * klass,
gpointer klass_data)
{
vala_dpap_record_factory_parent_class = g_type_class_peek_parent (klass);
}
static void
vala_dpap_record_factory_dmap_record_factory_interface_init (DMAPRecordFactoryIface * iface,
gpointer iface_data)
{
vala_dpap_record_factory_dmap_record_factory_parent_iface = g_type_interface_peek_parent (iface);
iface->create = (DMAPRecord* (*) (DMAPRecordFactory*, void*)) vala_dpap_record_factory_real_create;
}
static void
vala_dpap_record_factory_instance_init (ValaDPAPRecordFactory * self,
gpointer klass)
{
}
static GType
vala_dpap_record_factory_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecordFactory), 0, (GInstanceInitFunc) vala_dpap_record_factory_instance_init, NULL };
static const GInterfaceInfo dmap_record_factory_info = { (GInterfaceInitFunc) vala_dpap_record_factory_dmap_record_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dpap_record_factory_type_id;
vala_dpap_record_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecordFactory", &g_define_type_info, 0);
g_type_add_interface_static (vala_dpap_record_factory_type_id, DMAP_TYPE_RECORD_FACTORY, &dmap_record_factory_info);
return vala_dpap_record_factory_type_id;
}
GType
vala_dpap_record_factory_get_type (void)
{
static volatile gsize vala_dpap_record_factory_type_id__volatile = 0;
if (g_once_init_enter (&vala_dpap_record_factory_type_id__volatile)) {
GType vala_dpap_record_factory_type_id;
vala_dpap_record_factory_type_id = vala_dpap_record_factory_get_type_once ();
g_once_init_leave (&vala_dpap_record_factory_type_id__volatile, vala_dpap_record_factory_type_id);
}
return vala_dpap_record_factory_type_id__volatile;
}
libdmapsharing-2.9.41/tests/vala-dmap-db.vala 0000644 0002115 0001752 00000003755 13701471120 015754 0000000 0000000 /* FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class ValaDMAPDb : GLib.Object, DMAP.Db {
// A dumb database that stores everything in an array
/* FIXME: What is with this unowned? */
private Gee.ArrayList db = new Gee.ArrayList ();
public uint add (DMAP.Record record) {
db.add (((DMAP.Record) record));
return db.size;
}
public uint add_path (string path) {
GLib.error ("add_path not implemented");
}
public uint add_with_id (DMAP.Record record, uint id) {
GLib.error ("add_with_id not implemented");
}
public int64 count () {
return db.size;
}
public void @foreach (GLib.HFunc func) {
int i;
for (i = 0; i < db.size; i++) {
// NOTE: iPhoto does not like a record ID of 0,
// so we pretend to start with 1
func ((i + 1).to_pointer (), db[i]);
}
}
public unowned DMAP.Record lookup_by_id (uint id) {
// NOTE: iPhoto does not like a record ID of 0,
// so we pretend to start with 1
return db.get ((int) id - 1);
}
public uint lookup_id_by_location (string location){
GLib.error ("lookup_id_by_location not implemented");
}
}
libdmapsharing-2.9.41/tests/test-dmap-container-record.h 0000644 0002115 0001752 00000004440 13701471120 020155 0000000 0000000 /*
* Database record class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __TEST_DMAP_CONTAINER_RECORD
#define __TEST_DMAP_CONTAINER_RECORD
#include
#include "test-dmap-db.h"
G_BEGIN_DECLS
#define TYPE_TEST_DMAP_CONTAINER_RECORD (test_dmap_container_record_get_type ())
#define TEST_DMAP_CONTAINER_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
TYPE_TEST_DMAP_CONTAINER_RECORD, TestDMAPContainerRecord))
#define TEST_DMAP_CONTAINER_RECORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_TEST_DMAP_CONTAINER_RECORD, \
TestDMAPContainerRecordClass))
#define IS_TEST_DMAP_CONTAINER_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_CONTAINER_RECORD))
#define IS_TEST_DMAP_CONTAINER_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_CONTAINER_RECORD_CLASS))
#define TEST_DMAP_CONTAINER_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
TYPE_TEST_DMAP_CONTAINER_RECORD, \
TestDMAPContainerRecordClass))
typedef struct TestDMAPContainerRecordPrivate TestDMAPContainerRecordPrivate;
typedef struct {
GObject parent;
} TestDMAPContainerRecord;
typedef struct {
GObjectClass parent;
} TestDMAPContainerRecordClass;
GType test_dmap_container_record_get_type (void);
TestDMAPContainerRecord *test_dmap_container_record_new (void);
guint test_dmap_container_record_get_id (DMAPContainerRecord *record);
#endif /* __TEST_DMAP_CONTAINER_RECORD */
G_END_DECLS
libdmapsharing-2.9.41/tests/vala-dmap-container-db.c 0000644 0002115 0001752 00000021767 13701471324 017244 0000000 0000000 /* vala-dmap-container-db.c generated by valac 0.48.6, the Vala compiler
* generated from vala-dmap-container-db.vala, do not modify */
/* FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
typedef struct _ValaDMAPContainerDbPrivate ValaDMAPContainerDbPrivate;
enum {
VALA_DMAP_CONTAINER_DB_0_PROPERTY,
VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES
};
static GParamSpec* vala_dmap_container_db_properties[VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
struct _ValaDMAPContainerDb {
GObject parent_instance;
ValaDMAPContainerDbPrivate * priv;
};
struct _ValaDMAPContainerDbClass {
GObjectClass parent_class;
};
struct _ValaDMAPContainerDbPrivate {
GeeArrayList* db;
};
static gint ValaDMAPContainerDb_private_offset;
static gpointer vala_dmap_container_db_parent_class = NULL;
static DMAPContainerDbIface * vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base);
static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
GHFunc func,
gpointer func_target);
static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base,
guint id);
static void vala_dmap_container_db_real_add (DMAPContainerDb* base,
DMAPContainerRecord* record);
ValaDMAPContainerDb* vala_dmap_container_db_new (void);
ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
static void vala_dmap_container_db_finalize (GObject * obj);
static GType vala_dmap_container_db_get_type_once (void);
static inline gpointer
vala_dmap_container_db_get_instance_private (ValaDMAPContainerDb* self)
{
return G_STRUCT_MEMBER_P (self, ValaDMAPContainerDb_private_offset);
}
static gint64
vala_dmap_container_db_real_count (DMAPContainerDb* base)
{
ValaDMAPContainerDb * self;
GeeArrayList* _tmp0_;
gint _tmp1_;
gint _tmp2_;
gint64 result = 0LL;
self = (ValaDMAPContainerDb*) base;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
_tmp2_ = _tmp1_;
result = (gint64) _tmp2_;
return result;
}
static void
vala_dmap_container_db_real_foreach (DMAPContainerDb* base,
GHFunc func,
gpointer func_target)
{
ValaDMAPContainerDb * self;
gint i = 0;
self = (ValaDMAPContainerDb*) base;
{
gboolean _tmp0_ = FALSE;
i = 0;
_tmp0_ = TRUE;
while (TRUE) {
GeeArrayList* _tmp2_;
gint _tmp3_;
gint _tmp4_;
void* _tmp5_;
GeeArrayList* _tmp6_;
gpointer _tmp7_;
if (!_tmp0_) {
gint _tmp1_;
_tmp1_ = i;
i = _tmp1_ + 1;
}
_tmp0_ = FALSE;
_tmp2_ = self->priv->db;
_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
_tmp4_ = _tmp3_;
if (!(i < _tmp4_)) {
break;
}
_tmp5_ = GINT_TO_POINTER (i);
_tmp6_ = self->priv->db;
_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, i);
func (_tmp5_, (DMAPRecord*) _tmp7_, func_target);
}
}
}
static DMAPContainerRecord*
vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base,
guint id)
{
ValaDMAPContainerDb * self;
self = (ValaDMAPContainerDb*) base;
g_error ("vala-dmap-container-db.vala:41: lookup_by_id not implemented");
}
static void
vala_dmap_container_db_real_add (DMAPContainerDb* base,
DMAPContainerRecord* record)
{
ValaDMAPContainerDb * self;
self = (ValaDMAPContainerDb*) base;
g_return_if_fail (record != NULL);
g_error ("vala-dmap-container-db.vala:45: add not implemented");
}
ValaDMAPContainerDb*
vala_dmap_container_db_construct (GType object_type)
{
ValaDMAPContainerDb * self = NULL;
self = (ValaDMAPContainerDb*) g_object_new (object_type, NULL);
return self;
}
ValaDMAPContainerDb*
vala_dmap_container_db_new (void)
{
return vala_dmap_container_db_construct (TYPE_VALA_DMAP_CONTAINER_DB);
}
static void
vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass,
gpointer klass_data)
{
vala_dmap_container_db_parent_class = g_type_class_peek_parent (klass);
g_type_class_adjust_private_offset (klass, &ValaDMAPContainerDb_private_offset);
G_OBJECT_CLASS (klass)->finalize = vala_dmap_container_db_finalize;
}
static void
vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbIface * iface,
gpointer iface_data)
{
vala_dmap_container_db_dmap_container_db_parent_iface = g_type_interface_peek_parent (iface);
iface->count = (gint64 (*) (DMAPContainerDb*)) vala_dmap_container_db_real_count;
iface->foreach = (void (*) (DMAPContainerDb*, GHFunc, gpointer)) vala_dmap_container_db_real_foreach;
iface->lookup_by_id = (DMAPContainerRecord* (*) (DMAPContainerDb*, guint)) vala_dmap_container_db_real_lookup_by_id;
iface->add = (void (*) (DMAPContainerDb*, DMAPContainerRecord*)) vala_dmap_container_db_real_add;
}
static void
vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self,
gpointer klass)
{
GeeArrayList* _tmp0_;
self->priv = vala_dmap_container_db_get_instance_private (self);
_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, NULL, NULL, NULL, NULL, NULL);
self->priv->db = _tmp0_;
}
static void
vala_dmap_container_db_finalize (GObject * obj)
{
ValaDMAPContainerDb * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb);
_g_object_unref0 (self->priv->db);
G_OBJECT_CLASS (vala_dmap_container_db_parent_class)->finalize (obj);
}
static GType
vala_dmap_container_db_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPContainerDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPContainerDb), 0, (GInstanceInitFunc) vala_dmap_container_db_instance_init, NULL };
static const GInterfaceInfo dmap_container_db_info = { (GInterfaceInitFunc) vala_dmap_container_db_dmap_container_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dmap_container_db_type_id;
vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDMAPContainerDb", &g_define_type_info, 0);
g_type_add_interface_static (vala_dmap_container_db_type_id, DMAP_TYPE_CONTAINER_DB, &dmap_container_db_info);
ValaDMAPContainerDb_private_offset = g_type_add_instance_private (vala_dmap_container_db_type_id, sizeof (ValaDMAPContainerDbPrivate));
return vala_dmap_container_db_type_id;
}
GType
vala_dmap_container_db_get_type (void)
{
static volatile gsize vala_dmap_container_db_type_id__volatile = 0;
if (g_once_init_enter (&vala_dmap_container_db_type_id__volatile)) {
GType vala_dmap_container_db_type_id;
vala_dmap_container_db_type_id = vala_dmap_container_db_get_type_once ();
g_once_init_leave (&vala_dmap_container_db_type_id__volatile, vala_dmap_container_db_type_id);
}
return vala_dmap_container_db_type_id__volatile;
}
libdmapsharing-2.9.41/tests/dpapview.c 0000644 0002115 0001752 00000057512 13701471325 014654 0000000 0000000 /* dpapview.c generated by valac 0.48.6, the Vala compiler
* generated from dpapview.vala, do not modify */
/* FILE: dpapviewer.vala -- View DPAP data
* AUTHOR: W. Michael Petullo
* DATE: 24 November 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define TYPE_DPAP_VIEWER (dpap_viewer_get_type ())
#define DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_VIEWER, DPAPViewer))
#define DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_VIEWER, DPAPViewerClass))
#define IS_DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_VIEWER))
#define IS_DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_VIEWER))
#define DPAP_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_VIEWER, DPAPViewerClass))
typedef struct _DPAPViewer DPAPViewer;
typedef struct _DPAPViewerClass DPAPViewerClass;
typedef struct _DPAPViewerPrivate DPAPViewerPrivate;
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
typedef struct _ValaDMAPDb ValaDMAPDb;
typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
typedef struct _ValaDPAPRecord ValaDPAPRecord;
typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _dpap_viewer_unref0(var) ((var == NULL) ? NULL : (var = (dpap_viewer_unref (var), NULL)))
typedef struct _ParamSpecDPAPViewer ParamSpecDPAPViewer;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
struct _DPAPViewer {
GTypeInstance parent_instance;
volatile int ref_count;
DPAPViewerPrivate * priv;
};
struct _DPAPViewerClass {
GTypeClass parent_class;
void (*finalize) (DPAPViewer *self);
};
struct _DPAPViewerPrivate {
DMAPMdnsBrowser* browser;
DMAPConnection* connection;
GtkListStore* liststore;
ValaDMAPDb* db;
ValaDPAPRecordFactory* factory;
};
struct _ParamSpecDPAPViewer {
GParamSpec parent_instance;
};
static gint DPAPViewer_private_offset;
static gpointer dpap_viewer_parent_class = NULL;
gpointer dpap_viewer_ref (gpointer instance);
void dpap_viewer_unref (gpointer instance);
GParamSpec* param_spec_dpap_viewer (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_dpap_viewer (GValue* value,
gpointer v_object);
void value_take_dpap_viewer (GValue* value,
gpointer v_object);
gpointer value_get_dpap_viewer (const GValue* value);
GType dpap_viewer_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPViewer, dpap_viewer_unref)
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
static gboolean dpap_viewer_connected_cb (DPAPViewer* self,
DMAPConnection* connection,
gboolean _result_,
const gchar* reason);
static void __lambda4_ (DPAPViewer* self,
gconstpointer k,
gconstpointer v);
GType vala_dpap_record_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
static void ___lambda4__gh_func (gconstpointer key,
gconstpointer value,
gpointer self);
static void dpap_viewer_service_added_cb (DPAPViewer* self,
DMAPMdnsBrowserService* service);
static gboolean _dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection,
gboolean _result_,
const gchar* reason,
gpointer self);
DPAPViewer* dpap_viewer_new (GtkBuilder* builder,
GError** error);
DPAPViewer* dpap_viewer_construct (GType object_type,
GtkBuilder* builder,
GError** error);
ValaDMAPDb* vala_dmap_db_new (void);
ValaDMAPDb* vala_dmap_db_construct (GType object_type);
ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
static void _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
void* service,
gpointer self);
static void dpap_viewer_finalize (DPAPViewer * obj);
static GType dpap_viewer_get_type_once (void);
gint _vala_main (gchar** args,
gint args_length1);
static inline gpointer
dpap_viewer_get_instance_private (DPAPViewer* self)
{
return G_STRUCT_MEMBER_P (self, DPAPViewer_private_offset);
}
static void
__lambda4_ (DPAPViewer* self,
gconstpointer k,
gconstpointer v)
{
GdkPixbuf* pixbuf = NULL;
GByteArray* _tmp0_;
GByteArray* _tmp1_;
GtkTreeIter iter = {0};
GtkListStore* _tmp13_;
GtkTreeIter _tmp14_ = {0};
GtkListStore* _tmp15_;
GtkTreeIter _tmp16_;
GdkPixbuf* _tmp17_;
const gchar* _tmp18_;
const gchar* _tmp19_;
GError* _inner_error0_ = NULL;
pixbuf = NULL;
_tmp0_ = vala_dpap_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
_tmp1_ = _tmp0_;
if (_tmp1_ != NULL) {
gchar* path = NULL;
gint fd = 0;
gchar* _tmp2_ = NULL;
gint _tmp3_;
const gchar* _tmp4_;
GByteArray* _tmp5_;
GByteArray* _tmp6_;
guint8* _tmp7_;
gint _tmp7__length1;
GdkPixbuf* _tmp8_ = NULL;
const gchar* _tmp9_;
GdkPixbuf* _tmp10_;
GdkPixbuf* _tmp11_;
const gchar* _tmp12_;
_tmp3_ = g_file_open_tmp ("dpapview.XXXXXX", &_tmp2_, &_inner_error0_);
_g_free0 (path);
path = _tmp2_;
fd = _tmp3_;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
_g_free0 (path);
_g_object_unref0 (pixbuf);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return;
}
_tmp4_ = path;
_tmp5_ = vala_dpap_record_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
_tmp6_ = _tmp5_;
_tmp7_ = _tmp6_->data;
_tmp7__length1 = _tmp6_->len;
g_file_set_contents (_tmp4_, (const char*) _tmp7_, (size_t) _tmp7__length1, &_inner_error0_);
if (G_UNLIKELY (_inner_error0_ != NULL)) {
_g_free0 (path);
_g_object_unref0 (pixbuf);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return;
}
close (fd);
_tmp9_ = path;
_tmp10_ = gdk_pixbuf_new_from_file (_tmp9_, &_inner_error0_);
_tmp8_ = _tmp10_;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
_g_free0 (path);
_g_object_unref0 (pixbuf);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return;
}
_tmp11_ = _tmp8_;
_tmp8_ = NULL;
_g_object_unref0 (pixbuf);
pixbuf = _tmp11_;
_tmp12_ = path;
g_unlink (_tmp12_);
_g_object_unref0 (_tmp8_);
_g_free0 (path);
}
_tmp13_ = self->priv->liststore;
gtk_list_store_append (_tmp13_, &_tmp14_);
iter = _tmp14_;
_tmp15_ = self->priv->liststore;
_tmp16_ = iter;
_tmp17_ = pixbuf;
_tmp18_ = vala_dpap_record_get_filename (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
_tmp19_ = _tmp18_;
gtk_list_store_set (_tmp15_, &_tmp16_, 0, _tmp17_, 1, _tmp19_, -1);
_g_object_unref0 (pixbuf);
}
static void
___lambda4__gh_func (gconstpointer key,
gconstpointer value,
gpointer self)
{
__lambda4_ ((DPAPViewer*) self, key, value);
}
static gboolean
dpap_viewer_connected_cb (DPAPViewer* self,
DMAPConnection* connection,
gboolean _result_,
const gchar* reason)
{
ValaDMAPDb* _tmp0_;
ValaDMAPDb* _tmp1_;
gboolean result = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (connection != NULL, FALSE);
_tmp0_ = self->priv->db;
g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DMAPDb*) _tmp0_));
_tmp1_ = self->priv->db;
dmap_db_foreach ((DMAPDb*) _tmp1_, ___lambda4__gh_func, self);
result = TRUE;
return result;
}
static gboolean
_dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection,
gboolean _result_,
const gchar* reason,
gpointer self)
{
gboolean result;
result = dpap_viewer_connected_cb ((DPAPViewer*) self, connection, _result_, reason);
return result;
}
static void
dpap_viewer_service_added_cb (DPAPViewer* self,
DMAPMdnsBrowserService* service)
{
const gchar* _tmp0_;
const gchar* _tmp1_;
ValaDMAPDb* _tmp2_;
ValaDPAPRecordFactory* _tmp3_;
DPAPConnection* _tmp4_;
DMAPConnection* _tmp5_;
g_return_if_fail (self != NULL);
_tmp0_ = service->service_name;
_tmp1_ = service->host;
_tmp2_ = self->priv->db;
_tmp3_ = self->priv->factory;
_tmp4_ = dpap_connection_new (_tmp0_, _tmp1_, service->port, (DMAPDb*) _tmp2_, (DMAPRecordFactory*) _tmp3_);
_g_object_unref0 (self->priv->connection);
self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DMAP_TYPE_CONNECTION, DMAPConnection);
_tmp5_ = self->priv->connection;
dmap_connection_connect (_tmp5_, _dpap_viewer_connected_cb_dmap_connection_callback, self);
}
static gpointer
_g_object_ref0 (gpointer self)
{
return self ? g_object_ref (self) : NULL;
}
static void
_dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
void* service,
gpointer self)
{
dpap_viewer_service_added_cb ((DPAPViewer*) self, service);
}
DPAPViewer*
dpap_viewer_construct (GType object_type,
GtkBuilder* builder,
GError** error)
{
DPAPViewer* self = NULL;
GtkWidget* widget = NULL;
GObject* _tmp0_;
GtkWidget* _tmp1_;
GtkIconView* iconview = NULL;
GObject* _tmp2_;
GtkIconView* _tmp3_;
GObject* _tmp4_;
GtkListStore* _tmp5_;
ValaDMAPDb* _tmp6_;
ValaDPAPRecordFactory* _tmp7_;
DMAPMdnsBrowser* _tmp8_;
DMAPMdnsBrowser* _tmp9_;
DMAPMdnsBrowser* _tmp10_;
GError* _inner_error0_ = NULL;
g_return_val_if_fail (builder != NULL, NULL);
self = (DPAPViewer*) g_type_create_instance (object_type);
gtk_builder_connect_signals (builder, self);
_tmp0_ = gtk_builder_get_object (builder, "window");
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_widget_get_type ()) ? ((GtkWidget*) _tmp0_) : NULL);
widget = _tmp1_;
_tmp2_ = gtk_builder_get_object (builder, "iconview");
_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_icon_view_get_type ()) ? ((GtkIconView*) _tmp2_) : NULL);
iconview = _tmp3_;
_tmp4_ = gtk_builder_get_object (builder, "liststore");
_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_list_store_get_type ()) ? ((GtkListStore*) _tmp4_) : NULL);
_g_object_unref0 (self->priv->liststore);
self->priv->liststore = _tmp5_;
_tmp6_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = _tmp6_;
_tmp7_ = vala_dpap_record_factory_new ();
_g_object_unref0 (self->priv->factory);
self->priv->factory = _tmp7_;
gtk_icon_view_set_pixbuf_column (iconview, 0);
gtk_icon_view_set_text_column (iconview, 1);
gtk_widget_show_all (widget);
_tmp8_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
_g_object_unref0 (self->priv->browser);
self->priv->browser = _tmp8_;
_tmp9_ = self->priv->browser;
g_signal_connect (_tmp9_, "service-added", (GCallback) _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added, self);
_tmp10_ = self->priv->browser;
dmap_mdns_browser_start (_tmp10_, &_inner_error0_);
if (G_UNLIKELY (_inner_error0_ != NULL)) {
g_propagate_error (error, _inner_error0_);
_g_object_unref0 (iconview);
_g_object_unref0 (widget);
_dpap_viewer_unref0 (self);
return NULL;
}
_g_object_unref0 (iconview);
_g_object_unref0 (widget);
return self;
}
DPAPViewer*
dpap_viewer_new (GtkBuilder* builder,
GError** error)
{
return dpap_viewer_construct (TYPE_DPAP_VIEWER, builder, error);
}
static void
value_dpap_viewer_init (GValue* value)
{
value->data[0].v_pointer = NULL;
}
static void
value_dpap_viewer_free_value (GValue* value)
{
if (value->data[0].v_pointer) {
dpap_viewer_unref (value->data[0].v_pointer);
}
}
static void
value_dpap_viewer_copy_value (const GValue* src_value,
GValue* dest_value)
{
if (src_value->data[0].v_pointer) {
dest_value->data[0].v_pointer = dpap_viewer_ref (src_value->data[0].v_pointer);
} else {
dest_value->data[0].v_pointer = NULL;
}
}
static gpointer
value_dpap_viewer_peek_pointer (const GValue* value)
{
return value->data[0].v_pointer;
}
static gchar*
value_dpap_viewer_collect_value (GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
if (collect_values[0].v_pointer) {
DPAPViewer * object;
object = collect_values[0].v_pointer;
if (object->parent_instance.g_class == NULL) {
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
}
value->data[0].v_pointer = dpap_viewer_ref (object);
} else {
value->data[0].v_pointer = NULL;
}
return NULL;
}
static gchar*
value_dpap_viewer_lcopy_value (const GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
DPAPViewer ** object_p;
object_p = collect_values[0].v_pointer;
if (!object_p) {
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
}
if (!value->data[0].v_pointer) {
*object_p = NULL;
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
*object_p = value->data[0].v_pointer;
} else {
*object_p = dpap_viewer_ref (value->data[0].v_pointer);
}
return NULL;
}
GParamSpec*
param_spec_dpap_viewer (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags)
{
ParamSpecDPAPViewer* spec;
g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_VIEWER), NULL);
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
G_PARAM_SPEC (spec)->value_type = object_type;
return G_PARAM_SPEC (spec);
}
gpointer
value_get_dpap_viewer (const GValue* value)
{
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER), NULL);
return value->data[0].v_pointer;
}
void
value_set_dpap_viewer (GValue* value,
gpointer v_object)
{
DPAPViewer * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_VIEWER));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
dpap_viewer_ref (value->data[0].v_pointer);
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_viewer_unref (old);
}
}
void
value_take_dpap_viewer (GValue* value,
gpointer v_object)
{
DPAPViewer * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_VIEWER));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_viewer_unref (old);
}
}
static void
dpap_viewer_class_init (DPAPViewerClass * klass,
gpointer klass_data)
{
dpap_viewer_parent_class = g_type_class_peek_parent (klass);
((DPAPViewerClass *) klass)->finalize = dpap_viewer_finalize;
g_type_class_adjust_private_offset (klass, &DPAPViewer_private_offset);
}
static void
dpap_viewer_instance_init (DPAPViewer * self,
gpointer klass)
{
self->priv = dpap_viewer_get_instance_private (self);
self->ref_count = 1;
}
static void
dpap_viewer_finalize (DPAPViewer * obj)
{
DPAPViewer * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DPAP_VIEWER, DPAPViewer);
g_signal_handlers_destroy (self);
_g_object_unref0 (self->priv->browser);
_g_object_unref0 (self->priv->connection);
_g_object_unref0 (self->priv->liststore);
_g_object_unref0 (self->priv->db);
_g_object_unref0 (self->priv->factory);
}
static GType
dpap_viewer_get_type_once (void)
{
static const GTypeValueTable g_define_type_value_table = { value_dpap_viewer_init, value_dpap_viewer_free_value, value_dpap_viewer_copy_value, value_dpap_viewer_peek_pointer, "p", value_dpap_viewer_collect_value, "p", value_dpap_viewer_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (DPAPViewerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_viewer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPViewer), 0, (GInstanceInitFunc) dpap_viewer_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType dpap_viewer_type_id;
dpap_viewer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPViewer", &g_define_type_info, &g_define_type_fundamental_info, 0);
DPAPViewer_private_offset = g_type_add_instance_private (dpap_viewer_type_id, sizeof (DPAPViewerPrivate));
return dpap_viewer_type_id;
}
GType
dpap_viewer_get_type (void)
{
static volatile gsize dpap_viewer_type_id__volatile = 0;
if (g_once_init_enter (&dpap_viewer_type_id__volatile)) {
GType dpap_viewer_type_id;
dpap_viewer_type_id = dpap_viewer_get_type_once ();
g_once_init_leave (&dpap_viewer_type_id__volatile, dpap_viewer_type_id);
}
return dpap_viewer_type_id__volatile;
}
gpointer
dpap_viewer_ref (gpointer instance)
{
DPAPViewer * self;
self = instance;
g_atomic_int_inc (&self->ref_count);
return instance;
}
void
dpap_viewer_unref (gpointer instance)
{
DPAPViewer * self;
self = instance;
if (g_atomic_int_dec_and_test (&self->ref_count)) {
DPAP_VIEWER_GET_CLASS (self)->finalize (self);
g_type_free_instance ((GTypeInstance *) self);
}
}
gint
_vala_main (gchar** args,
gint args_length1)
{
GError* _inner_error0_ = NULL;
gint result = 0;
gtk_init ((gint*) (&args_length1), &args);
{
GtkBuilder* builder = NULL;
GtkBuilder* _tmp0_;
GtkBuilder* _tmp1_;
DPAPViewer* dpapviewer = NULL;
GtkBuilder* _tmp2_;
DPAPViewer* _tmp3_;
_tmp0_ = gtk_builder_new ();
builder = _tmp0_;
_tmp1_ = builder;
gtk_builder_add_from_file (_tmp1_, "tests/dpapview.ui", &_inner_error0_);
if (G_UNLIKELY (_inner_error0_ != NULL)) {
_g_object_unref0 (builder);
goto __catch0_g_error;
}
_tmp2_ = builder;
_tmp3_ = dpap_viewer_new (_tmp2_, &_inner_error0_);
dpapviewer = _tmp3_;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
_g_object_unref0 (builder);
goto __catch0_g_error;
}
gtk_main ();
_dpap_viewer_unref0 (dpapviewer);
_g_object_unref0 (builder);
}
goto __finally0;
__catch0_g_error:
{
GError* e = NULL;
FILE* _tmp4_;
GError* _tmp5_;
const gchar* _tmp6_;
e = _inner_error0_;
_inner_error0_ = NULL;
_tmp4_ = stderr;
_tmp5_ = e;
_tmp6_ = _tmp5_->message;
fprintf (_tmp4_, "Error: %s\n", _tmp6_);
result = 1;
_g_error_free0 (e);
return result;
}
__finally0:
if (G_UNLIKELY (_inner_error0_ != NULL)) {
gint _tmp7_ = -1;
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return _tmp7_;
}
result = 0;
return result;
}
int
main (int argc,
char ** argv)
{
return _vala_main (argv, argc);
}
libdmapsharing-2.9.41/tests/dpapview.ui 0000644 0002115 0001752 00000002115 12331133540 015024 0000000 0000000
libdmapsharing-2.9.41/tests/vala-dmap-container-db.vala 0000644 0002115 0001752 00000003065 13701471120 017726 0000000 0000000 /* FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class ValaDMAPContainerDb : GLib.Object, DMAP.ContainerDb {
// A dumb database that stores everything in an array
/* FIXME: What is with this unowned? */
private Gee.ArrayList db = new Gee.ArrayList ();
public int64 count () {
return db.size;
}
public void @foreach (GLib.HFunc func) {
int i;
for (i = 0; i < db.size; i++) {
func (i.to_pointer (), db[i]);
}
}
public unowned DMAP.ContainerRecord lookup_by_id (uint id) {
GLib.error ("lookup_by_id not implemented");
}
public void add (DMAP.ContainerRecord record) {
GLib.error ("add not implemented");
}
}
libdmapsharing-2.9.41/tests/unit-test.c 0000644 0002115 0001752 00000002052 13701471266 014762 0000000 0000000 /* Machine-generated by ./generate-test-suites; do not edit. */
#include
#include
#include
#include
#include "../libdmapsharing/daap-connection-suite.h"
#include "../libdmapsharing/dmap-md5-suite.h"
#include "../libdmapsharing/dmap-utils-suite.h"
static void
debug_null (const char *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
}
void run_suite (Suite *s)
{
int nf;
SRunner *sr;
sr = srunner_create(s);
srunner_run_all(sr, CK_NORMAL);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
if (nf != 0) {
exit (EXIT_FAILURE);
}
}
int main(void)
{
g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, debug_null, NULL);
g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_null, NULL);
run_suite(dmap_test_daap_connection());
run_suite(dmap_test_dmap_md5());
run_suite(dmap_test_dmap_utils());
exit (EXIT_SUCCESS);
}
libdmapsharing-2.9.41/tests/dacplisten.c 0000644 0002115 0001752 00000042452 13701471324 015157 0000000 0000000 /* dacplisten.c generated by valac 0.48.6, the Vala compiler
* generated from dacplisten.vala, do not modify */
/* FILE: dacplisten.vala -- Listen to DACP remotes
* AUTHOR: W. Michael Petullo
* DATE: 06 January 2011
*
* Copyright (c) 2011 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#define TYPE_VALA_DACP_PLAYER (vala_dacp_player_get_type ())
#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayer))
#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
#define IS_VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DACP_PLAYER))
#define IS_VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DACP_PLAYER))
#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
typedef struct _ValaDACPPlayer ValaDACPPlayer;
typedef struct _ValaDACPPlayerClass ValaDACPPlayerClass;
typedef struct _ValaDACPPlayerPrivate ValaDACPPlayerPrivate;
enum {
VALA_DACP_PLAYER_0_PROPERTY,
VALA_DACP_PLAYER_NUM_PROPERTIES
};
static GParamSpec* vala_dacp_player_properties[VALA_DACP_PLAYER_NUM_PROPERTIES];
#define TYPE_DACP_LISTENER (dacp_listener_get_type ())
#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DACPListener))
#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DACPListenerClass))
#define IS_DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DACP_LISTENER))
#define IS_DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DACP_LISTENER))
#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER, DACPListenerClass))
typedef struct _DACPListener DACPListener;
typedef struct _DACPListenerClass DACPListenerClass;
typedef struct _DACPListenerPrivate DACPListenerPrivate;
enum {
DACP_LISTENER_0_PROPERTY,
DACP_LISTENER_NUM_PROPERTIES
};
static GParamSpec* dacp_listener_properties[DACP_LISTENER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
typedef struct _ValaDMAPDb ValaDMAPDb;
typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
struct _ValaDACPPlayer {
GObject parent_instance;
ValaDACPPlayerPrivate * priv;
};
struct _ValaDACPPlayerClass {
GObjectClass parent_class;
};
struct _DACPListener {
GObject parent_instance;
DACPListenerPrivate * priv;
};
struct _DACPListenerClass {
GObjectClass parent_class;
};
struct _DACPListenerPrivate {
DMAPDb* db;
DMAPContainerDb* container_db;
DACPPlayer* player;
DACPShare* share;
};
static gpointer vala_dacp_player_parent_class = NULL;
static DACPPlayerIface * vala_dacp_player_dacp_player_parent_iface = NULL;
static gint DACPListener_private_offset;
static gpointer dacp_listener_parent_class = NULL;
GType vala_dacp_player_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDACPPlayer, g_object_unref)
static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base);
static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base,
guint width,
guint height,
gint* result_length1);
static void vala_dacp_player_real_play_pause (DACPPlayer* base);
static void vala_dacp_player_real_pause (DACPPlayer* base);
static void vala_dacp_player_real_next_item (DACPPlayer* base);
static void vala_dacp_player_real_prev_item (DACPPlayer* base);
static void vala_dacp_player_real_cue_clear (DACPPlayer* base);
static void vala_dacp_player_real_cue_play (DACPPlayer* base,
GList* records,
guint index);
ValaDACPPlayer* vala_dacp_player_new (void);
ValaDACPPlayer* vala_dacp_player_construct (GType object_type);
static GType vala_dacp_player_get_type_once (void);
GType dacp_listener_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DACPListener, g_object_unref)
DACPListener* dacp_listener_new (void);
DACPListener* dacp_listener_construct (GType object_type);
ValaDMAPDb* vala_dmap_db_new (void);
ValaDMAPDb* vala_dmap_db_construct (GType object_type);
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
ValaDMAPContainerDb* vala_dmap_container_db_new (void);
ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
static void __lambda4_ (DACPListener* self,
const gchar* service_name,
const gchar* display_name);
static void ___lambda4__dacp_share_remote_found (DACPShare* _sender,
const gchar* service_name,
const gchar* remote_name,
gpointer self);
static void __lambda5_ (DACPListener* self,
const gchar* guid);
static void ___lambda5__dacp_share_add_guid (DACPShare* _sender,
const gchar* guid,
gpointer self);
static void dacp_listener_finalize (GObject * obj);
static GType dacp_listener_get_type_once (void);
gint _vala_main (gchar** args,
gint args_length1);
static DAAPRecord*
vala_dacp_player_real_now_playing_record (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
DAAPRecord* result = NULL;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing record request received\n");
result = NULL;
return result;
}
static guchar*
vala_dacp_player_real_now_playing_artwork (DACPPlayer* base,
guint width,
guint height,
gint* result_length1)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
guchar* _tmp1_;
gint _tmp1__length1;
guchar* result = NULL;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing artwork request received\n");
_tmp1_ = NULL;
_tmp1__length1 = 0;
if (result_length1) {
*result_length1 = _tmp1__length1;
}
result = _tmp1_;
return result;
}
static void
vala_dacp_player_real_play_pause (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Play/pause request received\n");
}
static void
vala_dacp_player_real_pause (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Pause request received\n");
}
static void
vala_dacp_player_real_next_item (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Next item request received\n");
}
static void
vala_dacp_player_real_prev_item (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Previous item request received\n");
}
static void
vala_dacp_player_real_cue_clear (DACPPlayer* base)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue clear request received\n");
}
static void
vala_dacp_player_real_cue_play (DACPPlayer* base,
GList* records,
guint index)
{
ValaDACPPlayer * self;
FILE* _tmp0_;
self = (ValaDACPPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue play request received\n");
}
ValaDACPPlayer*
vala_dacp_player_construct (GType object_type)
{
ValaDACPPlayer * self = NULL;
self = (ValaDACPPlayer*) g_object_new (object_type, NULL);
return self;
}
ValaDACPPlayer*
vala_dacp_player_new (void)
{
return vala_dacp_player_construct (TYPE_VALA_DACP_PLAYER);
}
static void
vala_dacp_player_class_init (ValaDACPPlayerClass * klass,
gpointer klass_data)
{
vala_dacp_player_parent_class = g_type_class_peek_parent (klass);
}
static void
vala_dacp_player_dacp_player_interface_init (DACPPlayerIface * iface,
gpointer iface_data)
{
vala_dacp_player_dacp_player_parent_iface = g_type_interface_peek_parent (iface);
iface->now_playing_record = (DAAPRecord* (*) (DACPPlayer*)) vala_dacp_player_real_now_playing_record;
iface->now_playing_artwork = (guchar* (*) (DACPPlayer*, guint, guint, gint*)) vala_dacp_player_real_now_playing_artwork;
iface->play_pause = (void (*) (DACPPlayer*)) vala_dacp_player_real_play_pause;
iface->pause = (void (*) (DACPPlayer*)) vala_dacp_player_real_pause;
iface->next_item = (void (*) (DACPPlayer*)) vala_dacp_player_real_next_item;
iface->prev_item = (void (*) (DACPPlayer*)) vala_dacp_player_real_prev_item;
iface->cue_clear = (void (*) (DACPPlayer*)) vala_dacp_player_real_cue_clear;
iface->cue_play = (void (*) (DACPPlayer*, GList*, guint)) vala_dacp_player_real_cue_play;
}
static void
vala_dacp_player_instance_init (ValaDACPPlayer * self,
gpointer klass)
{
}
static GType
vala_dacp_player_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (ValaDACPPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDACPPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
static const GInterfaceInfo dacp_player_info = { (GInterfaceInitFunc) vala_dacp_player_dacp_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dacp_player_type_id;
vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDACPPlayer", &g_define_type_info, 0);
g_type_add_interface_static (vala_dacp_player_type_id, DACP_TYPE_PLAYER, &dacp_player_info);
return vala_dacp_player_type_id;
}
GType
vala_dacp_player_get_type (void)
{
static volatile gsize vala_dacp_player_type_id__volatile = 0;
if (g_once_init_enter (&vala_dacp_player_type_id__volatile)) {
GType vala_dacp_player_type_id;
vala_dacp_player_type_id = vala_dacp_player_get_type_once ();
g_once_init_leave (&vala_dacp_player_type_id__volatile, vala_dacp_player_type_id);
}
return vala_dacp_player_type_id__volatile;
}
static inline gpointer
dacp_listener_get_instance_private (DACPListener* self)
{
return G_STRUCT_MEMBER_P (self, DACPListener_private_offset);
}
static void
__lambda4_ (DACPListener* self,
const gchar* service_name,
const gchar* display_name)
{
FILE* _tmp0_;
g_return_if_fail (service_name != NULL);
g_return_if_fail (display_name != NULL);
_tmp0_ = stdout;
fprintf (_tmp0_, "Found remote: %s, %s\n", service_name, display_name);
}
static void
___lambda4__dacp_share_remote_found (DACPShare* _sender,
const gchar* service_name,
const gchar* remote_name,
gpointer self)
{
__lambda4_ ((DACPListener*) self, service_name, remote_name);
}
static void
__lambda5_ (DACPListener* self,
const gchar* guid)
{
FILE* _tmp0_;
g_return_if_fail (guid != NULL);
_tmp0_ = stdout;
fprintf (_tmp0_, "Add GUID request received\n");
}
static void
___lambda5__dacp_share_add_guid (DACPShare* _sender,
const gchar* guid,
gpointer self)
{
__lambda5_ ((DACPListener*) self, guid);
}
DACPListener*
dacp_listener_construct (GType object_type)
{
DACPListener * self = NULL;
ValaDMAPDb* _tmp0_;
ValaDMAPContainerDb* _tmp1_;
ValaDACPPlayer* _tmp2_;
DACPPlayer* _tmp3_;
DMAPDb* _tmp4_;
DMAPContainerDb* _tmp5_;
DACPShare* _tmp6_;
DACPShare* _tmp7_;
DACPShare* _tmp8_;
DACPShare* _tmp9_;
self = (DACPListener*) g_object_new (object_type, NULL);
_tmp0_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = (DMAPDb*) _tmp0_;
_tmp1_ = vala_dmap_container_db_new ();
_g_object_unref0 (self->priv->container_db);
self->priv->container_db = (DMAPContainerDb*) _tmp1_;
_tmp2_ = vala_dacp_player_new ();
_g_object_unref0 (self->priv->player);
self->priv->player = (DACPPlayer*) _tmp2_;
_tmp3_ = self->priv->player;
_tmp4_ = self->priv->db;
_tmp5_ = self->priv->container_db;
_tmp6_ = dacp_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp6_;
_tmp7_ = self->priv->share;
g_signal_connect_object (_tmp7_, "remote-found", (GCallback) ___lambda4__dacp_share_remote_found, self, 0);
_tmp8_ = self->priv->share;
g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda5__dacp_share_add_guid, self, 0);
_tmp9_ = self->priv->share;
dacp_share_start_lookup (_tmp9_);
return self;
}
DACPListener*
dacp_listener_new (void)
{
return dacp_listener_construct (TYPE_DACP_LISTENER);
}
static void
dacp_listener_class_init (DACPListenerClass * klass,
gpointer klass_data)
{
dacp_listener_parent_class = g_type_class_peek_parent (klass);
g_type_class_adjust_private_offset (klass, &DACPListener_private_offset);
G_OBJECT_CLASS (klass)->finalize = dacp_listener_finalize;
}
static void
dacp_listener_instance_init (DACPListener * self,
gpointer klass)
{
self->priv = dacp_listener_get_instance_private (self);
}
static void
dacp_listener_finalize (GObject * obj)
{
DACPListener * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DACP_LISTENER, DACPListener);
_g_object_unref0 (self->priv->db);
_g_object_unref0 (self->priv->container_db);
_g_object_unref0 (self->priv->player);
_g_object_unref0 (self->priv->share);
G_OBJECT_CLASS (dacp_listener_parent_class)->finalize (obj);
}
static GType
dacp_listener_get_type_once (void)
{
static const GTypeInfo g_define_type_info = { sizeof (DACPListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DACPListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
GType dacp_listener_type_id;
dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DACPListener", &g_define_type_info, 0);
DACPListener_private_offset = g_type_add_instance_private (dacp_listener_type_id, sizeof (DACPListenerPrivate));
return dacp_listener_type_id;
}
GType
dacp_listener_get_type (void)
{
static volatile gsize dacp_listener_type_id__volatile = 0;
if (g_once_init_enter (&dacp_listener_type_id__volatile)) {
GType dacp_listener_type_id;
dacp_listener_type_id = dacp_listener_get_type_once ();
g_once_init_leave (&dacp_listener_type_id__volatile, dacp_listener_type_id);
}
return dacp_listener_type_id__volatile;
}
gint
_vala_main (gchar** args,
gint args_length1)
{
GMainLoop* loop = NULL;
GMainLoop* _tmp0_;
DACPListener* dacplistener = NULL;
DACPListener* _tmp1_;
gint result = 0;
_tmp0_ = g_main_loop_new (NULL, FALSE);
loop = _tmp0_;
_tmp1_ = dacp_listener_new ();
dacplistener = _tmp1_;
g_main_loop_run (loop);
result = 0;
_g_object_unref0 (dacplistener);
_g_main_loop_unref0 (loop);
return result;
}
int
main (int argc,
char ** argv)
{
return _vala_main (argv, argc);
}
libdmapsharing-2.9.41/tests/test-dmap-client.c 0000644 0002115 0001752 00000011074 13701471120 016171 0000000 0000000 /*
* Copyright (C) 2006 INDT
* Andre Moreira Magalhaes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include
#include
#include
#include
#include
#include
#include
#include "test-dmap-db.h"
enum {
DAAP,
DPAP
};
static GMainLoop *loop;
static guint conn_type = DAAP;
static void
print_record (gpointer id, DMAPRecord *record, gpointer user_data)
{
gboolean has_video;
gchar *artist, *title;
g_object_get (record,
"has-video", &has_video,
"songartist", &artist,
"title", &title,
NULL);
g_print ("%d: %s %s (has video: %s)\n", GPOINTER_TO_UINT (id), artist, title, has_video ? "Y" : "N");
g_free (artist);
g_free (title);
}
static void
connected_cb (DMAPConnection *connection,
gboolean result,
const char *reason,
DMAPDb *db)
{
g_print ("Connection cb., DB has %lu entries\n", dmap_db_count (db));
dmap_db_foreach (db, (GHFunc) print_record, NULL);
}
static void
authenticate_cb (DMAPConnection *connection,
const char *name,
SoupSession *session,
SoupMessage *msg,
SoupAuth *auth,
gboolean retrying,
gpointer user_data)
{
char *username, password[BUFSIZ + 1], *rc;
g_object_get (connection, "username", &username, NULL);
g_print ("Password required (username is %s): ", username);
rc = fgets (password, BUFSIZ, stdin);
if (rc != password) {
g_error ("failed to read password");
}
password[strlen(password) - 1] = 0x00; // Remove newline.
g_object_set (connection, "password", password, NULL);
soup_auth_authenticate (auth, username, password);
soup_session_unpause_message (session, msg);
}
static void
service_added_cb (DMAPMdnsBrowser *browser,
DMAPMdnsBrowserService *service,
gpointer user_data)
{
DMAPRecordFactory *factory;
DMAPConnection *conn;
DMAPDb *db;
g_debug ("service added %s:%s:%s:%d",
service->service_name,
service->name,
service->host,
service->port);
db = DMAP_DB (test_dmap_db_new ());
if (db == NULL) {
g_error ("Error creating DB");
}
if (conn_type == DAAP) {
factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
if (factory == NULL) {
g_error ("Error creating record factory");
}
conn = DMAP_CONNECTION (daap_connection_new (service->name, service->host, service->port, db, factory));
} else {
factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
if (factory == NULL) {
g_error ("Error creating record factory");
}
conn = DMAP_CONNECTION (dpap_connection_new (service->name, service->host, service->port, db, factory));
}
g_signal_connect (DMAP_CONNECTION (conn), "authenticate", G_CALLBACK(authenticate_cb), NULL);
dmap_connection_connect (DMAP_CONNECTION (conn), (DMAPConnectionCallback) connected_cb, db);
}
int main(int argc, char **argv)
{
DMAPMdnsBrowser *browser;
GError *error = NULL;
if (argc == 2)
conn_type = atoi (argv[1]);
loop = g_main_loop_new (NULL, FALSE);
if (conn_type == DAAP)
browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DAAP);
else
browser = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
g_signal_connect (G_OBJECT (browser),
"service-added",
G_CALLBACK (service_added_cb),
NULL);
g_debug ("starting mdns browser");
dmap_mdns_browser_start (browser, &error);
if (error) {
g_warning ("error starting browser. code: %d message: %s",
error->code,
error->message);
return 1;
}
g_main_loop_run (loop);
return 0;
}
libdmapsharing-2.9.41/tests/dmapserve.c 0000644 0002115 0001752 00000037763 13701471325 015031 0000000 0000000 /* dmapserve.c generated by valac 0.48.6, the Vala compiler
* generated from dmapserve.vala, do not modify */
/* FILE: dmapserve.vala -- Serve media using DMAP
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#include
#define TYPE_DPAP_SERVE (dpap_serve_get_type ())
#define DPAP_SERVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_SERVE, DPAPServe))
#define DPAP_SERVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_SERVE, DPAPServeClass))
#define IS_DPAP_SERVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_SERVE))
#define IS_DPAP_SERVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_SERVE))
#define DPAP_SERVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_SERVE, DPAPServeClass))
typedef struct _DPAPServe DPAPServe;
typedef struct _DPAPServeClass DPAPServeClass;
typedef struct _DPAPServePrivate DPAPServePrivate;
#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
typedef struct _ValaDPAPRecord ValaDPAPRecord;
typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
typedef struct _ValaDMAPDb ValaDMAPDb;
typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ParamSpecDPAPServe ParamSpecDPAPServe;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _dpap_serve_unref0(var) ((var == NULL) ? NULL : (var = (dpap_serve_unref (var), NULL)))
struct _DPAPServe {
GTypeInstance parent_instance;
volatile int ref_count;
DPAPServePrivate * priv;
};
struct _DPAPServeClass {
GTypeClass parent_class;
void (*finalize) (DPAPServe *self);
};
struct _DPAPServePrivate {
ValaDPAPRecord* record;
ValaDMAPDb* db;
ValaDMAPContainerDb* container_db;
DPAPShare* share;
};
struct _ParamSpecDPAPServe {
GParamSpec parent_instance;
};
static gint DPAPServe_private_offset;
static gpointer dpap_serve_parent_class = NULL;
gpointer dpap_serve_ref (gpointer instance);
void dpap_serve_unref (gpointer instance);
GParamSpec* param_spec_dpap_serve (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_dpap_serve (GValue* value,
gpointer v_object);
void value_take_dpap_serve (GValue* value,
gpointer v_object);
gpointer value_get_dpap_serve (const GValue* value);
GType dpap_serve_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPServe, dpap_serve_unref)
GType vala_dpap_record_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPContainerDb, g_object_unref)
DPAPServe* dpap_serve_new (GError** error);
DPAPServe* dpap_serve_construct (GType object_type,
GError** error);
ValaDPAPRecord* vala_dpap_record_new (void);
ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
ValaDMAPDb* vala_dmap_db_new (void);
ValaDMAPDb* vala_dmap_db_construct (GType object_type);
ValaDMAPContainerDb* vala_dmap_container_db_new (void);
ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
static void dpap_serve_finalize (DPAPServe * obj);
static GType dpap_serve_get_type_once (void);
void debug_printf (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message);
void debug_null (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message);
gint _vala_main (gchar** args,
gint args_length1);
static void _debug_printf_glog_func (const gchar* log_domain,
GLogLevelFlags log_levels,
const gchar* message,
gpointer self);
static inline gpointer
dpap_serve_get_instance_private (DPAPServe* self)
{
return G_STRUCT_MEMBER_P (self, DPAPServe_private_offset);
}
DPAPServe*
dpap_serve_construct (GType object_type,
GError** error)
{
DPAPServe* self = NULL;
ValaDPAPRecord* _tmp0_;
ValaDMAPDb* _tmp1_;
ValaDMAPDb* _tmp2_;
ValaDPAPRecord* _tmp3_;
ValaDMAPContainerDb* _tmp4_;
ValaDMAPDb* _tmp5_;
ValaDMAPContainerDb* _tmp6_;
DPAPShare* _tmp7_;
self = (DPAPServe*) g_type_create_instance (object_type);
_tmp0_ = vala_dpap_record_new ();
_g_object_unref0 (self->priv->record);
self->priv->record = _tmp0_;
_tmp1_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = _tmp1_;
_tmp2_ = self->priv->db;
_tmp3_ = self->priv->record;
dmap_db_add ((DMAPDb*) _tmp2_, (DMAPRecord*) _tmp3_);
_tmp4_ = vala_dmap_container_db_new ();
_g_object_unref0 (self->priv->container_db);
self->priv->container_db = _tmp4_;
_tmp5_ = self->priv->db;
_tmp6_ = self->priv->container_db;
_tmp7_ = dpap_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp7_;
return self;
}
DPAPServe*
dpap_serve_new (GError** error)
{
return dpap_serve_construct (TYPE_DPAP_SERVE, error);
}
static void
value_dpap_serve_init (GValue* value)
{
value->data[0].v_pointer = NULL;
}
static void
value_dpap_serve_free_value (GValue* value)
{
if (value->data[0].v_pointer) {
dpap_serve_unref (value->data[0].v_pointer);
}
}
static void
value_dpap_serve_copy_value (const GValue* src_value,
GValue* dest_value)
{
if (src_value->data[0].v_pointer) {
dest_value->data[0].v_pointer = dpap_serve_ref (src_value->data[0].v_pointer);
} else {
dest_value->data[0].v_pointer = NULL;
}
}
static gpointer
value_dpap_serve_peek_pointer (const GValue* value)
{
return value->data[0].v_pointer;
}
static gchar*
value_dpap_serve_collect_value (GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
if (collect_values[0].v_pointer) {
DPAPServe * object;
object = collect_values[0].v_pointer;
if (object->parent_instance.g_class == NULL) {
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
}
value->data[0].v_pointer = dpap_serve_ref (object);
} else {
value->data[0].v_pointer = NULL;
}
return NULL;
}
static gchar*
value_dpap_serve_lcopy_value (const GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
DPAPServe ** object_p;
object_p = collect_values[0].v_pointer;
if (!object_p) {
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
}
if (!value->data[0].v_pointer) {
*object_p = NULL;
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
*object_p = value->data[0].v_pointer;
} else {
*object_p = dpap_serve_ref (value->data[0].v_pointer);
}
return NULL;
}
GParamSpec*
param_spec_dpap_serve (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags)
{
ParamSpecDPAPServe* spec;
g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_SERVE), NULL);
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
G_PARAM_SPEC (spec)->value_type = object_type;
return G_PARAM_SPEC (spec);
}
gpointer
value_get_dpap_serve (const GValue* value)
{
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE), NULL);
return value->data[0].v_pointer;
}
void
value_set_dpap_serve (GValue* value,
gpointer v_object)
{
DPAPServe * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_SERVE));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
dpap_serve_ref (value->data[0].v_pointer);
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_serve_unref (old);
}
}
void
value_take_dpap_serve (GValue* value,
gpointer v_object)
{
DPAPServe * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_SERVE));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_serve_unref (old);
}
}
static void
dpap_serve_class_init (DPAPServeClass * klass,
gpointer klass_data)
{
dpap_serve_parent_class = g_type_class_peek_parent (klass);
((DPAPServeClass *) klass)->finalize = dpap_serve_finalize;
g_type_class_adjust_private_offset (klass, &DPAPServe_private_offset);
}
static void
dpap_serve_instance_init (DPAPServe * self,
gpointer klass)
{
self->priv = dpap_serve_get_instance_private (self);
self->ref_count = 1;
}
static void
dpap_serve_finalize (DPAPServe * obj)
{
DPAPServe * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DPAP_SERVE, DPAPServe);
g_signal_handlers_destroy (self);
_g_object_unref0 (self->priv->record);
_g_object_unref0 (self->priv->db);
_g_object_unref0 (self->priv->container_db);
_g_object_unref0 (self->priv->share);
}
static GType
dpap_serve_get_type_once (void)
{
static const GTypeValueTable g_define_type_value_table = { value_dpap_serve_init, value_dpap_serve_free_value, value_dpap_serve_copy_value, value_dpap_serve_peek_pointer, "p", value_dpap_serve_collect_value, "p", value_dpap_serve_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (DPAPServeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_serve_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPServe), 0, (GInstanceInitFunc) dpap_serve_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType dpap_serve_type_id;
dpap_serve_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPServe", &g_define_type_info, &g_define_type_fundamental_info, 0);
DPAPServe_private_offset = g_type_add_instance_private (dpap_serve_type_id, sizeof (DPAPServePrivate));
return dpap_serve_type_id;
}
GType
dpap_serve_get_type (void)
{
static volatile gsize dpap_serve_type_id__volatile = 0;
if (g_once_init_enter (&dpap_serve_type_id__volatile)) {
GType dpap_serve_type_id;
dpap_serve_type_id = dpap_serve_get_type_once ();
g_once_init_leave (&dpap_serve_type_id__volatile, dpap_serve_type_id);
}
return dpap_serve_type_id__volatile;
}
gpointer
dpap_serve_ref (gpointer instance)
{
DPAPServe * self;
self = instance;
g_atomic_int_inc (&self->ref_count);
return instance;
}
void
dpap_serve_unref (gpointer instance)
{
DPAPServe * self;
self = instance;
if (g_atomic_int_dec_and_test (&self->ref_count)) {
DPAP_SERVE_GET_CLASS (self)->finalize (self);
g_type_free_instance ((GTypeInstance *) self);
}
}
void
debug_printf (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message)
{
FILE* _tmp0_;
_tmp0_ = stdout;
fprintf (_tmp0_, "%s\n", message);
}
void
debug_null (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message)
{
}
static void
_debug_printf_glog_func (const gchar* log_domain,
GLogLevelFlags log_levels,
const gchar* message,
gpointer self)
{
debug_printf (log_domain, log_levels, message);
}
gint
_vala_main (gchar** args,
gint args_length1)
{
GMainLoop* loop = NULL;
GMainLoop* _tmp0_;
DPAPServe* dmapcopy = NULL;
DPAPServe* _tmp1_;
GError* _inner_error0_ = NULL;
gint result = 0;
_tmp0_ = g_main_loop_new (NULL, FALSE);
loop = _tmp0_;
g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_printf_glog_func, NULL);
g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, _debug_printf_glog_func, NULL);
_tmp1_ = dpap_serve_new (&_inner_error0_);
dmapcopy = _tmp1_;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
gint _tmp2_ = -1;
_g_main_loop_unref0 (loop);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return _tmp2_;
}
g_main_loop_run (loop);
result = 0;
_dpap_serve_unref0 (dmapcopy);
_g_main_loop_unref0 (loop);
return result;
}
int
main (int argc,
char ** argv)
{
return _vala_main (argv, argc);
}
libdmapsharing-2.9.41/tests/dacplisten.vala 0000644 0002115 0001752 00000004705 13701471120 015651 0000000 0000000 /* FILE: dacplisten.vala -- Listen to DACP remotes
* AUTHOR: W. Michael Petullo
* DATE: 06 January 2011
*
* Copyright (c) 2011 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class ValaDACPPlayer : GLib.Object, DACP.Player {
unowned DAAP.Record now_playing_record () {
stdout.printf ("Now playing record request received\n");
return null;
}
unowned uchar[] now_playing_artwork (uint width, uint height) {
stdout.printf ("Now playing artwork request received\n");
return null;
}
void play_pause () {
stdout.printf ("Play/pause request received\n");
}
void pause () {
stdout.printf ("Pause request received\n");
}
void next_item () {
stdout.printf ("Next item request received\n");
}
void prev_item () {
stdout.printf ("Previous item request received\n");
}
void cue_clear () {
stdout.printf ("Cue clear request received\n");
}
void cue_play (GLib.List records, uint index) {
stdout.printf ("Cue play request received\n");
}
}
private class DACPListener : GLib.Object {
private DMAP.Db db;
private DMAP.ContainerDb container_db;
private DACP.Player player;
private DACP.Share share;
public DACPListener () {
db = new ValaDMAPDb ();
container_db = new ValaDMAPContainerDb ();
player = new ValaDACPPlayer ();
share = new DACP.Share ("dacplisten", player, db, container_db);
share.remote_found.connect ((service_name, display_name) => {
stdout.printf ("Found remote: %s, %s\n", service_name, display_name);
});
share.add_guid.connect ((guid) => {
stdout.printf ("Add GUID request received\n");
});
share.start_lookup ();
}
}
int main (string[] args) {
var loop = new GLib.MainLoop ();
var dacplistener = new DACPListener ();
loop.run ();
return 0;
}
libdmapsharing-2.9.41/tests/dpapview.vala 0000644 0002115 0001752 00000005604 13701471120 015341 0000000 0000000 /* FILE: dpapviewer.vala -- View DPAP data
* AUTHOR: W. Michael Petullo
* DATE: 24 November 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class DPAPViewer {
private DMAP.MdnsBrowser browser;
private DMAP.Connection connection;
private Gtk.ListStore liststore;
private ValaDMAPDb db;
private ValaDPAPRecordFactory factory;
private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
db.foreach ((k, v) => {
Gdk.Pixbuf pixbuf = null;
if (((ValaDPAPRecord) v).thumbnail != null) {
string path;
int fd = GLib.FileUtils.open_tmp ("dpapview.XXXXXX", out path);
GLib.FileUtils.set_data (path, ((ValaDPAPRecord) v).thumbnail.data);
GLib.FileUtils.close (fd);
pixbuf = new Gdk.Pixbuf.from_file (path);
GLib.FileUtils.unlink (path);
}
Gtk.TreeIter iter;
liststore.append (out iter);
liststore.set (iter, 0, pixbuf, 1, ((ValaDPAPRecord) v).filename);
});
return true;
}
private void service_added_cb (DMAP.MdnsBrowserService *service) {
connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, db, factory);
connection.connect (connected_cb);
}
public DPAPViewer (Gtk.Builder builder) throws GLib.Error {
builder.connect_signals (this);
Gtk.Widget widget = builder.get_object ("window") as Gtk.Widget;
Gtk.IconView iconview = builder.get_object ("iconview") as Gtk.IconView;
liststore = builder.get_object ("liststore") as Gtk.ListStore;
db = new ValaDMAPDb ();
factory = new ValaDPAPRecordFactory ();
iconview.set_pixbuf_column (0);
iconview.set_text_column (1);
widget.show_all ();
browser = new DMAP.MdnsBrowser (DMAP.MdnsBrowserServiceType.DPAP);
browser.service_added.connect (service_added_cb);
browser.start ();
}
}
int main (string[] args) {
Gtk.init (ref args);
try {
var builder = new Gtk.Builder ();
builder.add_from_file ("tests/dpapview.ui");
var dpapviewer = new DPAPViewer (builder);
Gtk.main ();
} catch (GLib.Error e) {
stderr.printf ("Error: %s\n", e.message);
return 1;
}
return 0;
}
libdmapsharing-2.9.41/tests/vala-dpap-record.vala 0000644 0002115 0001752 00000006601 13701471120 016641 0000000 0000000 /* FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
* AUTHOR: W. Michael Petullo
* DATE: 21 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
private string _location;
private string _filename;
private string _aspect_ratio;
private string _format;
private string _comments;
GLib.ByteArray _thumbnail;
private int _large_filesize;
private int _pixel_height;
private int _pixel_width;
private int _rating;
private int _creation_date;
public string location {
get { return _location; }
set { _location = value; }
}
public string filename {
get { return _filename; }
set { _filename = value; }
}
public string aspect_ratio {
get { return _aspect_ratio; }
set { _aspect_ratio = value; }
}
public string format {
get { return _format; }
set { _format = value; }
}
public GLib.ByteArray thumbnail {
get { return _thumbnail; }
set { /* C implementations just use g_byte_array_ref (value); */
_thumbnail = new GLib.ByteArray ();
_thumbnail.append (value.data);
}
}
public string comments {
get { return _comments; }
set { _comments = value; }
}
public int large_filesize {
get { return _large_filesize; }
set { _large_filesize = value; }
}
public int pixel_height {
get { return _pixel_height; }
set { _pixel_height = value; }
}
public int pixel_width {
get { return _pixel_width; }
set { _pixel_width = value; }
}
public int rating {
get { return _rating; }
set { _rating = value; }
}
public int creation_date {
get { return _creation_date; }
set { _creation_date = value; }
}
public unowned GLib.InputStream read () throws GLib.Error {
GLib.error ("read not implemented");
}
public unowned bool set_from_blob (GLib.ByteArray blob) {
GLib.error ("set_from_blob not implemented");
}
public unowned GLib.ByteArray to_blob () {
GLib.error ("to_blob not implemented");
}
public ValaDPAPRecord () {
_location = "file://" + GLib.Environment.get_current_dir () + "/media/test.jpeg";
_aspect_ratio = "1.333";
_filename = GLib.Path.get_basename (_location);
_format = "JPEG";
_comments = "Comments";
_large_filesize = 13953;
_pixel_height = 480;
_pixel_width = 640;
_rating = 5;
_creation_date = 0;
string path = GLib.Environment.get_current_dir () + "/media/test.jpeg";
uint8[] data;
GLib.FileUtils.get_data (path, out data);
_thumbnail = new GLib.ByteArray ();
_thumbnail.append (data);
}
}
private class ValaDPAPRecordFactory : GLib.Object, DMAP.RecordFactory {
public DMAP.Record create (void* user_data) {
return new ValaDPAPRecord ();
}
}
libdmapsharing-2.9.41/tests/dmapcopy.c 0000644 0002115 0001752 00000047214 13701471325 014647 0000000 0000000 /* dmapcopy.c generated by valac 0.48.6, the Vala compiler
* generated from dmapcopy.vala, do not modify */
/* FILE: dmapcopy.vala -- Copy files from a DMAP server
* AUTHOR: W. Michael Petullo
* DATE: 20 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#include
#define TYPE_DPAP_COPY (dpap_copy_get_type ())
#define DPAP_COPY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_COPY, DPAPCopy))
#define DPAP_COPY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_COPY, DPAPCopyClass))
#define IS_DPAP_COPY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_COPY))
#define IS_DPAP_COPY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_COPY))
#define DPAP_COPY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_COPY, DPAPCopyClass))
typedef struct _DPAPCopy DPAPCopy;
typedef struct _DPAPCopyClass DPAPCopyClass;
typedef struct _DPAPCopyPrivate DPAPCopyPrivate;
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
typedef struct _ValaDMAPDb ValaDMAPDb;
typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
typedef struct _ValaDPAPRecord ValaDPAPRecord;
typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
#define _dpap_copy_unref0(var) ((var == NULL) ? NULL : (var = (dpap_copy_unref (var), NULL)))
typedef struct _ParamSpecDPAPCopy ParamSpecDPAPCopy;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
struct _DPAPCopy {
GTypeInstance parent_instance;
volatile int ref_count;
DPAPCopyPrivate * priv;
};
struct _DPAPCopyClass {
GTypeClass parent_class;
void (*finalize) (DPAPCopy *self);
};
struct _DPAPCopyPrivate {
DMAPMdnsBrowser* browser;
DMAPConnection* connection;
ValaDMAPDb* db;
ValaDPAPRecordFactory* factory;
};
struct _ParamSpecDPAPCopy {
GParamSpec parent_instance;
};
static gint DPAPCopy_private_offset;
static gpointer dpap_copy_parent_class = NULL;
gpointer dpap_copy_ref (gpointer instance);
void dpap_copy_unref (gpointer instance);
GParamSpec* param_spec_dpap_copy (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_dpap_copy (GValue* value,
gpointer v_object);
void value_take_dpap_copy (GValue* value,
gpointer v_object);
gpointer value_get_dpap_copy (const GValue* value);
GType dpap_copy_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DPAPCopy, dpap_copy_unref)
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDMAPDb, g_object_unref)
GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecordFactory, g_object_unref)
static gboolean dpap_copy_connected_cb (DPAPCopy* self,
DMAPConnection* connection,
gboolean _result_,
const gchar* reason);
static void __lambda4_ (DPAPCopy* self,
gconstpointer k,
gconstpointer v);
GType vala_dpap_record_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ValaDPAPRecord, g_object_unref)
const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
static void ___lambda4__gh_func (gconstpointer key,
gconstpointer value,
gpointer self);
static void dpap_copy_service_added_cb (DPAPCopy* self,
DMAPMdnsBrowserService* service);
static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection,
gboolean _result_,
const gchar* reason,
gpointer self);
DPAPCopy* dpap_copy_new (GError** error);
DPAPCopy* dpap_copy_construct (GType object_type,
GError** error);
ValaDMAPDb* vala_dmap_db_new (void);
ValaDMAPDb* vala_dmap_db_construct (GType object_type);
ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
static void _dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
void* service,
gpointer self);
static void dpap_copy_finalize (DPAPCopy * obj);
static GType dpap_copy_get_type_once (void);
void debug_printf (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message);
void debug_null (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message);
gint _vala_main (gchar** args,
gint args_length1);
static void _debug_null_glog_func (const gchar* log_domain,
GLogLevelFlags log_levels,
const gchar* message,
gpointer self);
static inline gpointer
dpap_copy_get_instance_private (DPAPCopy* self)
{
return G_STRUCT_MEMBER_P (self, DPAPCopy_private_offset);
}
static void
__lambda4_ (DPAPCopy* self,
gconstpointer k,
gconstpointer v)
{
FILE* _tmp0_;
const gchar* _tmp1_;
const gchar* _tmp2_;
_tmp0_ = stdout;
_tmp1_ = vala_dpap_record_get_location (G_TYPE_CHECK_INSTANCE_CAST (v, TYPE_VALA_DPAP_RECORD, ValaDPAPRecord));
_tmp2_ = _tmp1_;
fprintf (_tmp0_, "%s\n", _tmp2_);
}
static void
___lambda4__gh_func (gconstpointer key,
gconstpointer value,
gpointer self)
{
__lambda4_ ((DPAPCopy*) self, key, value);
}
static gboolean
dpap_copy_connected_cb (DPAPCopy* self,
DMAPConnection* connection,
gboolean _result_,
const gchar* reason)
{
ValaDMAPDb* _tmp0_;
ValaDMAPDb* _tmp1_;
gboolean result = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (connection != NULL, FALSE);
_tmp0_ = self->priv->db;
g_debug ("%" G_GINT64_FORMAT " entries\n", dmap_db_count ((DMAPDb*) _tmp0_));
_tmp1_ = self->priv->db;
dmap_db_foreach ((DMAPDb*) _tmp1_, ___lambda4__gh_func, self);
result = TRUE;
return result;
}
static gboolean
_dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection,
gboolean _result_,
const gchar* reason,
gpointer self)
{
gboolean result;
result = dpap_copy_connected_cb ((DPAPCopy*) self, connection, _result_, reason);
return result;
}
static void
dpap_copy_service_added_cb (DPAPCopy* self,
DMAPMdnsBrowserService* service)
{
const gchar* _tmp0_;
const gchar* _tmp1_;
ValaDMAPDb* _tmp2_;
ValaDPAPRecordFactory* _tmp3_;
DPAPConnection* _tmp4_;
DMAPConnection* _tmp5_;
g_return_if_fail (self != NULL);
_tmp0_ = service->service_name;
_tmp1_ = service->host;
_tmp2_ = self->priv->db;
_tmp3_ = self->priv->factory;
_tmp4_ = dpap_connection_new (_tmp0_, _tmp1_, service->port, (DMAPDb*) _tmp2_, (DMAPRecordFactory*) _tmp3_);
_g_object_unref0 (self->priv->connection);
self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, DMAP_TYPE_CONNECTION, DMAPConnection);
_tmp5_ = self->priv->connection;
dmap_connection_connect (_tmp5_, _dpap_copy_connected_cb_dmap_connection_callback, self);
}
static void
_dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender,
void* service,
gpointer self)
{
dpap_copy_service_added_cb ((DPAPCopy*) self, service);
}
DPAPCopy*
dpap_copy_construct (GType object_type,
GError** error)
{
DPAPCopy* self = NULL;
ValaDMAPDb* _tmp0_;
ValaDPAPRecordFactory* _tmp1_;
DMAPMdnsBrowser* _tmp2_;
DMAPMdnsBrowser* _tmp3_;
DMAPMdnsBrowser* _tmp4_;
GError* _inner_error0_ = NULL;
self = (DPAPCopy*) g_type_create_instance (object_type);
_tmp0_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = _tmp0_;
_tmp1_ = vala_dpap_record_factory_new ();
_g_object_unref0 (self->priv->factory);
self->priv->factory = _tmp1_;
_tmp2_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
_g_object_unref0 (self->priv->browser);
self->priv->browser = _tmp2_;
_tmp3_ = self->priv->browser;
g_signal_connect (_tmp3_, "service-added", (GCallback) _dpap_copy_service_added_cb_dmap_mdns_browser_service_added, self);
_tmp4_ = self->priv->browser;
dmap_mdns_browser_start (_tmp4_, &_inner_error0_);
if (G_UNLIKELY (_inner_error0_ != NULL)) {
g_propagate_error (error, _inner_error0_);
_dpap_copy_unref0 (self);
return NULL;
}
return self;
}
DPAPCopy*
dpap_copy_new (GError** error)
{
return dpap_copy_construct (TYPE_DPAP_COPY, error);
}
static void
value_dpap_copy_init (GValue* value)
{
value->data[0].v_pointer = NULL;
}
static void
value_dpap_copy_free_value (GValue* value)
{
if (value->data[0].v_pointer) {
dpap_copy_unref (value->data[0].v_pointer);
}
}
static void
value_dpap_copy_copy_value (const GValue* src_value,
GValue* dest_value)
{
if (src_value->data[0].v_pointer) {
dest_value->data[0].v_pointer = dpap_copy_ref (src_value->data[0].v_pointer);
} else {
dest_value->data[0].v_pointer = NULL;
}
}
static gpointer
value_dpap_copy_peek_pointer (const GValue* value)
{
return value->data[0].v_pointer;
}
static gchar*
value_dpap_copy_collect_value (GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
if (collect_values[0].v_pointer) {
DPAPCopy * object;
object = collect_values[0].v_pointer;
if (object->parent_instance.g_class == NULL) {
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
}
value->data[0].v_pointer = dpap_copy_ref (object);
} else {
value->data[0].v_pointer = NULL;
}
return NULL;
}
static gchar*
value_dpap_copy_lcopy_value (const GValue* value,
guint n_collect_values,
GTypeCValue* collect_values,
guint collect_flags)
{
DPAPCopy ** object_p;
object_p = collect_values[0].v_pointer;
if (!object_p) {
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
}
if (!value->data[0].v_pointer) {
*object_p = NULL;
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
*object_p = value->data[0].v_pointer;
} else {
*object_p = dpap_copy_ref (value->data[0].v_pointer);
}
return NULL;
}
GParamSpec*
param_spec_dpap_copy (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags)
{
ParamSpecDPAPCopy* spec;
g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_COPY), NULL);
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
G_PARAM_SPEC (spec)->value_type = object_type;
return G_PARAM_SPEC (spec);
}
gpointer
value_get_dpap_copy (const GValue* value)
{
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY), NULL);
return value->data[0].v_pointer;
}
void
value_set_dpap_copy (GValue* value,
gpointer v_object)
{
DPAPCopy * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_COPY));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
dpap_copy_ref (value->data[0].v_pointer);
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_copy_unref (old);
}
}
void
value_take_dpap_copy (GValue* value,
gpointer v_object)
{
DPAPCopy * old;
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY));
old = value->data[0].v_pointer;
if (v_object) {
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_COPY));
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
value->data[0].v_pointer = v_object;
} else {
value->data[0].v_pointer = NULL;
}
if (old) {
dpap_copy_unref (old);
}
}
static void
dpap_copy_class_init (DPAPCopyClass * klass,
gpointer klass_data)
{
dpap_copy_parent_class = g_type_class_peek_parent (klass);
((DPAPCopyClass *) klass)->finalize = dpap_copy_finalize;
g_type_class_adjust_private_offset (klass, &DPAPCopy_private_offset);
}
static void
dpap_copy_instance_init (DPAPCopy * self,
gpointer klass)
{
self->priv = dpap_copy_get_instance_private (self);
self->ref_count = 1;
}
static void
dpap_copy_finalize (DPAPCopy * obj)
{
DPAPCopy * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DPAP_COPY, DPAPCopy);
g_signal_handlers_destroy (self);
_g_object_unref0 (self->priv->browser);
_g_object_unref0 (self->priv->connection);
_g_object_unref0 (self->priv->db);
_g_object_unref0 (self->priv->factory);
}
static GType
dpap_copy_get_type_once (void)
{
static const GTypeValueTable g_define_type_value_table = { value_dpap_copy_init, value_dpap_copy_free_value, value_dpap_copy_copy_value, value_dpap_copy_peek_pointer, "p", value_dpap_copy_collect_value, "p", value_dpap_copy_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (DPAPCopyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_copy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPCopy), 0, (GInstanceInitFunc) dpap_copy_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType dpap_copy_type_id;
dpap_copy_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPCopy", &g_define_type_info, &g_define_type_fundamental_info, 0);
DPAPCopy_private_offset = g_type_add_instance_private (dpap_copy_type_id, sizeof (DPAPCopyPrivate));
return dpap_copy_type_id;
}
GType
dpap_copy_get_type (void)
{
static volatile gsize dpap_copy_type_id__volatile = 0;
if (g_once_init_enter (&dpap_copy_type_id__volatile)) {
GType dpap_copy_type_id;
dpap_copy_type_id = dpap_copy_get_type_once ();
g_once_init_leave (&dpap_copy_type_id__volatile, dpap_copy_type_id);
}
return dpap_copy_type_id__volatile;
}
gpointer
dpap_copy_ref (gpointer instance)
{
DPAPCopy * self;
self = instance;
g_atomic_int_inc (&self->ref_count);
return instance;
}
void
dpap_copy_unref (gpointer instance)
{
DPAPCopy * self;
self = instance;
if (g_atomic_int_dec_and_test (&self->ref_count)) {
DPAP_COPY_GET_CLASS (self)->finalize (self);
g_type_free_instance ((GTypeInstance *) self);
}
}
void
debug_printf (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message)
{
FILE* _tmp0_;
_tmp0_ = stdout;
fprintf (_tmp0_, "%s\n", message);
}
void
debug_null (const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message)
{
}
static void
_debug_null_glog_func (const gchar* log_domain,
GLogLevelFlags log_levels,
const gchar* message,
gpointer self)
{
debug_null (log_domain, log_levels, message);
}
gint
_vala_main (gchar** args,
gint args_length1)
{
GMainLoop* loop = NULL;
GMainLoop* _tmp0_;
DPAPCopy* dmapcopy = NULL;
DPAPCopy* _tmp1_;
GError* _inner_error0_ = NULL;
gint result = 0;
_tmp0_ = g_main_loop_new (NULL, FALSE);
loop = _tmp0_;
g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_null_glog_func, NULL);
g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, _debug_null_glog_func, NULL);
_tmp1_ = dpap_copy_new (&_inner_error0_);
dmapcopy = _tmp1_;
if (G_UNLIKELY (_inner_error0_ != NULL)) {
gint _tmp2_ = -1;
_g_main_loop_unref0 (loop);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
g_clear_error (&_inner_error0_);
return _tmp2_;
}
g_main_loop_run (loop);
result = 0;
_dpap_copy_unref0 (dmapcopy);
_g_main_loop_unref0 (loop);
return result;
}
int
main (int argc,
char ** argv)
{
return _vala_main (argv, argc);
}
libdmapsharing-2.9.41/tests/Makefile.in 0000644 0002115 0001752 00000072177 13701471255 014744 0000000 0000000 # Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@TESTS_ENABLED_TRUE@noinst_PROGRAMS = test-dmap-client$(EXEEXT) \
@TESTS_ENABLED_TRUE@ test-dmap-server$(EXEEXT) $(am__EXEEXT_1) \
@TESTS_ENABLED_TRUE@ $(am__EXEEXT_2) $(am__EXEEXT_3)
@BUILD_VALATESTS_TRUE@@TESTS_ENABLED_TRUE@am__append_1 = dacplisten dmapcopy dmapserve
@BUILD_DPAPVIEW_TRUE@@TESTS_ENABLED_TRUE@am__append_2 = dpapview
# Automake documentation mentions LDADD, but it does not work;
# LIBS does.
@TESTS_ENABLED_TRUE@am__append_3 = $(top_builddir)/libdmapsharing/libdmapsharing-3.0.la
@HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@am__append_4 = unit-test
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-compiler-flag.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/introspection.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@BUILD_VALATESTS_TRUE@@TESTS_ENABLED_TRUE@am__EXEEXT_1 = \
@BUILD_VALATESTS_TRUE@@TESTS_ENABLED_TRUE@ dacplisten$(EXEEXT) \
@BUILD_VALATESTS_TRUE@@TESTS_ENABLED_TRUE@ dmapcopy$(EXEEXT) \
@BUILD_VALATESTS_TRUE@@TESTS_ENABLED_TRUE@ dmapserve$(EXEEXT)
@BUILD_DPAPVIEW_TRUE@@TESTS_ENABLED_TRUE@am__EXEEXT_2 = \
@BUILD_DPAPVIEW_TRUE@@TESTS_ENABLED_TRUE@ dpapview$(EXEEXT)
@HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@am__EXEEXT_3 = \
@HAVE_CHECK_TRUE@@TESTS_ENABLED_TRUE@ unit-test$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am__objects_1 = dacplisten.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
vala-dmap-container-db.$(OBJEXT)
am__objects_2 = $(am__objects_1)
am_dacplisten_OBJECTS = $(am__objects_2)
dacplisten_OBJECTS = $(am_dacplisten_OBJECTS)
am__DEPENDENCIES_1 =
dacplisten_DEPENDENCIES = $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
am__objects_3 = dmapcopy.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
vala-dpap-record.$(OBJEXT)
am__objects_4 = $(am__objects_3)
am_dmapcopy_OBJECTS = $(am__objects_4)
dmapcopy_OBJECTS = $(am_dmapcopy_OBJECTS)
dmapcopy_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__objects_5 = dmapserve.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
vala-dpap-record.$(OBJEXT) vala-dmap-container-db.$(OBJEXT)
am__objects_6 = $(am__objects_5)
am_dmapserve_OBJECTS = $(am__objects_6)
dmapserve_OBJECTS = $(am_dmapserve_OBJECTS)
dmapserve_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__objects_7 = dpapview.$(OBJEXT) vala-dmap-db.$(OBJEXT) \
vala-dpap-record.$(OBJEXT)
am__objects_8 = $(am__objects_7)
am_dpapview_OBJECTS = $(am__objects_8)
dpapview_OBJECTS = $(am_dpapview_OBJECTS)
dpapview_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_test_dmap_client_OBJECTS = test-dmap-db.$(OBJEXT) \
test-dmap-client.$(OBJEXT)
test_dmap_client_OBJECTS = $(am_test_dmap_client_OBJECTS)
test_dmap_client_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_test_dmap_server_OBJECTS = test-dmap-db.$(OBJEXT) \
test-dmap-container-record.$(OBJEXT) \
test-dmap-container-db.$(OBJEXT) test-dmap-server.$(OBJEXT)
test_dmap_server_OBJECTS = $(am_test_dmap_server_OBJECTS)
test_dmap_server_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_unit_test_OBJECTS = unit-test.$(OBJEXT)
unit_test_OBJECTS = $(am_unit_test_OBJECTS)
unit_test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/dacplisten.Po \
./$(DEPDIR)/dmapcopy.Po ./$(DEPDIR)/dmapserve.Po \
./$(DEPDIR)/dpapview.Po ./$(DEPDIR)/test-dmap-client.Po \
./$(DEPDIR)/test-dmap-container-db.Po \
./$(DEPDIR)/test-dmap-container-record.Po \
./$(DEPDIR)/test-dmap-db.Po ./$(DEPDIR)/test-dmap-server.Po \
./$(DEPDIR)/unit-test.Po ./$(DEPDIR)/vala-dmap-container-db.Po \
./$(DEPDIR)/vala-dmap-db.Po ./$(DEPDIR)/vala-dpap-record.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(dacplisten_SOURCES) $(dmapcopy_SOURCES) \
$(dmapserve_SOURCES) $(dpapview_SOURCES) \
$(test_dmap_client_SOURCES) $(test_dmap_server_SOURCES) \
$(unit_test_SOURCES)
DIST_SOURCES = $(dacplisten_SOURCES) $(dmapcopy_SOURCES) \
$(dmapserve_SOURCES) $(dpapview_SOURCES) \
$(test_dmap_client_SOURCES) $(test_dmap_server_SOURCES) \
$(unit_test_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
API_VERSION = @API_VERSION@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHECK_CFLAGS = @CHECK_CFLAGS@
CHECK_LIBS = @CHECK_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DMAP_HAVE_UNALIGNED_ACCESS_DEFINE = @DMAP_HAVE_UNALIGNED_ACCESS_DEFINE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
GEE_CFLAGS = @GEE_CFLAGS@
GEE_LIBS = @GEE_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
GOBJECT_LIBS = @GOBJECT_LIBS@
GREP = @GREP@
GSTLIB = @GSTLIB@
GSTREAMERAPP_CFLAGS = @GSTREAMERAPP_CFLAGS@
GSTREAMERAPP_LIBS = @GSTREAMERAPP_LIBS@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
HAVE_PKGCONFIG = @HAVE_PKGCONFIG@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ $(am__append_3)
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MDNS_CFLAGS = @MDNS_CFLAGS@
MDNS_LIBS = @MDNS_LIBS@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PEDANSEE = @PEDANSEE@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOUP_CFLAGS = @SOUP_CFLAGS@
SOUP_LIBS = @SOUP_LIBS@
SO_VERSION = @SO_VERSION@
STRIP = @STRIP@
VALAC = @VALAC@
VALA_GEN_INTROSPECT = @VALA_GEN_INTROSPECT@
VAPIGEN = @VAPIGEN@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
test_dmap_client_SOURCES = \
test-dmap-db.c \
test-dmap-client.c
test_dmap_client_LDADD = \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(GSTREAMERAPP_LIBS) \
$(GOBJECT_LIBS) \
$(GDKPIXBUF_LIBS) \
$(SOUP_LIBS) \
$(IMAGEMAGICK_LIBS) \
$(MDNS_LIBS)
test_dmap_server_SOURCES = \
test-dmap-db.c \
test-dmap-container-record.c \
test-dmap-container-db.c \
test-dmap-server.c
test_dmap_server_LDADD = \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(GSTREAMERAPP_LIBS) \
$(GOBJECT_LIBS) \
$(GDKPIXBUF_LIBS) \
$(SOUP_LIBS) \
$(IMAGEMAGICK_LIBS) \
$(MDNS_LIBS)
dacplisten_VALASOURCES = \
dacplisten.vala \
vala-dmap-db.vala \
vala-dmap-container-db.vala
dacplisten_VALABUILTSOURCES = $(dacplisten_VALASOURCES:.vala=.c)
dacplisten_SOURCES = \
$(dacplisten_VALABUILTSOURCES)
dacplisten_LDADD = \
$(GEE_LIBS)
dpapview_VALASOURCES = \
dpapview.vala \
vala-dmap-db.vala \
vala-dpap-record.vala
dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
dpapview_SOURCES = \
$(dpapview_VALABUILTSOURCES)
dpapview_LDADD = \
$(GTK_LIBS) \
$(GEE_LIBS)
dmapcopy_VALASOURCES = \
dmapcopy.vala \
vala-dmap-db.vala \
vala-dpap-record.vala
dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
dmapcopy_SOURCES = \
$(dmapcopy_VALABUILTSOURCES)
dmapcopy_LDADD = \
$(GEE_LIBS)
dmapserve_VALASOURCES = \
dmapserve.vala \
vala-dmap-db.vala \
vala-dpap-record.vala \
vala-dmap-container-db.vala
dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
dmapserve_SOURCES = \
$(dmapserve_VALABUILTSOURCES)
dmapserve_LDADD = \
$(GEE_LIBS)
unit_test_SOURCES = \
unit-test.c
unit_test_LDADD = \
$(CHECK_LIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GDKPIXBUF_CFLAGS) \
$(GEE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GSTREAMERAPP_CFLAGS) \
$(GTHREAD_CFLAGS) \
$(GTK_CFLAGS) \
$(IMAGEMAGICK_CFLAGS) \
$(MDNS_CFLAGS) \
$(SOUP_CFLAGS)
noinst_HEADERS = \
test-dmap-container-record.h \
test-dmap-container-db.h \
test-dmap-db.h
EXTRA_DIST = \
$(dacplisten_VALABUILTSOURCES) \
$(dacplisten_VALASOURCES) \
$(dmapcopy_VALABUILTSOURCES) \
$(dmapcopy_VALASOURCES) \
$(dmapserve_VALABUILTSOURCES) \
$(dmapserve_VALASOURCES) \
$(dpapview_VALABUILTSOURCES) \
$(dpapview_VALASOURCES) \
dpapview.ui
@HAVE_VALAC_TRUE@CLEANFILES = \
@HAVE_VALAC_TRUE@ $(dacplisten_VALABUILTSOURCES) \
@HAVE_VALAC_TRUE@ $(dmapcopy_VALABUILTSOURCES) \
@HAVE_VALAC_TRUE@ $(dmapserve_VALABUILTSOURCES) \
@HAVE_VALAC_TRUE@ $(dpapview_VALABUILTSOURCES) \
@HAVE_VALAC_TRUE@ $(dpapview_VALABUILTSOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
dacplisten$(EXEEXT): $(dacplisten_OBJECTS) $(dacplisten_DEPENDENCIES) $(EXTRA_dacplisten_DEPENDENCIES)
@rm -f dacplisten$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(dacplisten_OBJECTS) $(dacplisten_LDADD) $(LIBS)
dmapcopy$(EXEEXT): $(dmapcopy_OBJECTS) $(dmapcopy_DEPENDENCIES) $(EXTRA_dmapcopy_DEPENDENCIES)
@rm -f dmapcopy$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(dmapcopy_OBJECTS) $(dmapcopy_LDADD) $(LIBS)
dmapserve$(EXEEXT): $(dmapserve_OBJECTS) $(dmapserve_DEPENDENCIES) $(EXTRA_dmapserve_DEPENDENCIES)
@rm -f dmapserve$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(dmapserve_OBJECTS) $(dmapserve_LDADD) $(LIBS)
dpapview$(EXEEXT): $(dpapview_OBJECTS) $(dpapview_DEPENDENCIES) $(EXTRA_dpapview_DEPENDENCIES)
@rm -f dpapview$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(dpapview_OBJECTS) $(dpapview_LDADD) $(LIBS)
test-dmap-client$(EXEEXT): $(test_dmap_client_OBJECTS) $(test_dmap_client_DEPENDENCIES) $(EXTRA_test_dmap_client_DEPENDENCIES)
@rm -f test-dmap-client$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dmap_client_OBJECTS) $(test_dmap_client_LDADD) $(LIBS)
test-dmap-server$(EXEEXT): $(test_dmap_server_OBJECTS) $(test_dmap_server_DEPENDENCIES) $(EXTRA_test_dmap_server_DEPENDENCIES)
@rm -f test-dmap-server$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dmap_server_OBJECTS) $(test_dmap_server_LDADD) $(LIBS)
unit-test$(EXEEXT): $(unit_test_OBJECTS) $(unit_test_DEPENDENCIES) $(EXTRA_unit_test_DEPENDENCIES)
@rm -f unit-test$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(unit_test_OBJECTS) $(unit_test_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dacplisten.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmapcopy.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmapserve.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpapview.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-container-db.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-container-record.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-db.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dmap-server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit-test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dmap-container-db.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dmap-db.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vala-dpap-record.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -f ./$(DEPDIR)/dacplisten.Po
-rm -f ./$(DEPDIR)/dmapcopy.Po
-rm -f ./$(DEPDIR)/dmapserve.Po
-rm -f ./$(DEPDIR)/dpapview.Po
-rm -f ./$(DEPDIR)/test-dmap-client.Po
-rm -f ./$(DEPDIR)/test-dmap-container-db.Po
-rm -f ./$(DEPDIR)/test-dmap-container-record.Po
-rm -f ./$(DEPDIR)/test-dmap-db.Po
-rm -f ./$(DEPDIR)/test-dmap-server.Po
-rm -f ./$(DEPDIR)/unit-test.Po
-rm -f ./$(DEPDIR)/vala-dmap-container-db.Po
-rm -f ./$(DEPDIR)/vala-dmap-db.Po
-rm -f ./$(DEPDIR)/vala-dpap-record.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/dacplisten.Po
-rm -f ./$(DEPDIR)/dmapcopy.Po
-rm -f ./$(DEPDIR)/dmapserve.Po
-rm -f ./$(DEPDIR)/dpapview.Po
-rm -f ./$(DEPDIR)/test-dmap-client.Po
-rm -f ./$(DEPDIR)/test-dmap-container-db.Po
-rm -f ./$(DEPDIR)/test-dmap-container-record.Po
-rm -f ./$(DEPDIR)/test-dmap-db.Po
-rm -f ./$(DEPDIR)/test-dmap-server.Po
-rm -f ./$(DEPDIR)/unit-test.Po
-rm -f ./$(DEPDIR)/vala-dmap-container-db.Po
-rm -f ./$(DEPDIR)/vala-dmap-db.Po
-rm -f ./$(DEPDIR)/vala-dpap-record.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
dacplisten.c: $(dacplisten_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dpapview.c: $(dpapview_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dmapcopy.c: $(dmapcopy_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dmapserve.c: $(dmapserve_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
libdmapsharing-2.9.41/tests/test-dmap-db.c 0000644 0002115 0001752 00000005304 13701471120 015277 0000000 0000000 /*
* Database record class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include
#include "test-dmap-db.h"
struct TestDMAPDbPrivate {
GHashTable *db;
guint nextid;
};
static DMAPRecord *
test_dmap_db_lookup_by_id (const DMAPDb *db, guint id)
{
DMAPRecord *record;
record = g_hash_table_lookup (TEST_DMAP_DB (db)->priv->db, GUINT_TO_POINTER (id));
g_object_ref (record);
return record;
}
static void
test_dmap_db_foreach (const DMAPDb *db,
GHFunc func,
gpointer data)
{
g_hash_table_foreach (TEST_DMAP_DB (db)->priv->db, (GHFunc) func, data);
}
static gint64
test_dmap_db_count (const DMAPDb *db)
{
return g_hash_table_size (TEST_DMAP_DB (db)->priv->db);
}
static guint
test_dmap_db_add (DMAPDb *db, DMAPRecord *record)
{
guint id;
id = TEST_DMAP_DB (db)->priv->nextid--;
g_object_ref (record);
g_hash_table_insert (TEST_DMAP_DB (db)->priv->db, GUINT_TO_POINTER (id), record);
return id;
}
static void
test_dmap_db_init (TestDMAPDb *db)
{
db->priv = TEST_DMAP_DB_GET_PRIVATE (db);
db->priv->db = g_hash_table_new (g_direct_hash, g_direct_equal);
/* Media ID's start at max and go down.
* Container ID's start at 1 and go up.
*/
db->priv->nextid = G_MAXINT;
}
static void
test_dmap_db_class_init (TestDMAPDbClass *klass)
{
g_type_class_add_private (klass, sizeof (TestDMAPDbPrivate));
}
static void
test_dmap_db_interface_init (gpointer iface, gpointer data)
{
DMAPDbIface *dmap_db = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
dmap_db->add = test_dmap_db_add;
dmap_db->lookup_by_id = test_dmap_db_lookup_by_id;
dmap_db->foreach = test_dmap_db_foreach;
dmap_db->count = test_dmap_db_count;
}
G_DEFINE_TYPE_WITH_CODE (TestDMAPDb, test_dmap_db, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
test_dmap_db_interface_init))
TestDMAPDb *
test_dmap_db_new (void)
{
TestDMAPDb *db;
db = TEST_DMAP_DB (g_object_new (TYPE_TEST_DMAP_DB, NULL));
return db;
}
libdmapsharing-2.9.41/tests/Makefile.am 0000644 0002115 0001752 00000007037 13701471120 014713 0000000 0000000 if TESTS_ENABLED
noinst_PROGRAMS = test-dmap-client test-dmap-server
if BUILD_VALATESTS
noinst_PROGRAMS += dacplisten dmapcopy dmapserve
endif
if BUILD_DPAPVIEW
noinst_PROGRAMS += dpapview
endif
# Automake documentation mentions LDADD, but it does not work;
# LIBS does.
LIBS += $(top_builddir)/libdmapsharing/libdmapsharing-3.0.la
if HAVE_CHECK
noinst_PROGRAMS += unit-test
endif
endif
test_dmap_client_SOURCES = \
test-dmap-db.c \
test-dmap-client.c
test_dmap_client_LDADD = \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(GSTREAMERAPP_LIBS) \
$(GOBJECT_LIBS) \
$(GDKPIXBUF_LIBS) \
$(SOUP_LIBS) \
$(IMAGEMAGICK_LIBS) \
$(MDNS_LIBS)
test_dmap_server_SOURCES = \
test-dmap-db.c \
test-dmap-container-record.c \
test-dmap-container-db.c \
test-dmap-server.c
test_dmap_server_LDADD = \
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(GSTREAMERAPP_LIBS) \
$(GOBJECT_LIBS) \
$(GDKPIXBUF_LIBS) \
$(SOUP_LIBS) \
$(IMAGEMAGICK_LIBS) \
$(MDNS_LIBS)
dacplisten.c: $(dacplisten_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dpapview.c: $(dpapview_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gtk+-3.0 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dmapcopy.c: $(dmapcopy_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dmapserve.c: $(dmapserve_VALASOURCES)
$(VALAC) --vapidir=../vala --pkg gee-0.8 --pkg gstreamer-1.0 --pkg libdmapsharing-3.0 --pkg libsoup-2.4 --pkg gio-2.0 --pkg avahi-gobject $^ -C
dacplisten_VALASOURCES = \
dacplisten.vala \
vala-dmap-db.vala \
vala-dmap-container-db.vala
dacplisten_VALABUILTSOURCES = $(dacplisten_VALASOURCES:.vala=.c)
dacplisten_SOURCES = \
$(dacplisten_VALABUILTSOURCES)
dacplisten_LDADD = \
$(GEE_LIBS)
dpapview_VALASOURCES = \
dpapview.vala \
vala-dmap-db.vala \
vala-dpap-record.vala
dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
dpapview_SOURCES = \
$(dpapview_VALABUILTSOURCES)
dpapview_LDADD = \
$(GTK_LIBS) \
$(GEE_LIBS)
dmapcopy_VALASOURCES = \
dmapcopy.vala \
vala-dmap-db.vala \
vala-dpap-record.vala
dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
dmapcopy_SOURCES = \
$(dmapcopy_VALABUILTSOURCES)
dmapcopy_LDADD = \
$(GEE_LIBS)
dmapserve_VALASOURCES = \
dmapserve.vala \
vala-dmap-db.vala \
vala-dpap-record.vala \
vala-dmap-container-db.vala
dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
dmapserve_SOURCES = \
$(dmapserve_VALABUILTSOURCES)
dmapserve_LDADD = \
$(GEE_LIBS)
unit_test_SOURCES = \
unit-test.c
unit_test_LDADD = \
$(CHECK_LIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(GDKPIXBUF_CFLAGS) \
$(GEE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GSTREAMERAPP_CFLAGS) \
$(GTHREAD_CFLAGS) \
$(GTK_CFLAGS) \
$(IMAGEMAGICK_CFLAGS) \
$(MDNS_CFLAGS) \
$(SOUP_CFLAGS)
noinst_HEADERS = \
test-dmap-container-record.h \
test-dmap-container-db.h \
test-dmap-db.h
EXTRA_DIST = \
$(dacplisten_VALABUILTSOURCES) \
$(dacplisten_VALASOURCES) \
$(dmapcopy_VALABUILTSOURCES) \
$(dmapcopy_VALASOURCES) \
$(dmapserve_VALABUILTSOURCES) \
$(dmapserve_VALASOURCES) \
$(dpapview_VALABUILTSOURCES) \
$(dpapview_VALASOURCES) \
dpapview.ui
if HAVE_VALAC
CLEANFILES = \
$(dacplisten_VALABUILTSOURCES) \
$(dmapcopy_VALABUILTSOURCES) \
$(dmapserve_VALABUILTSOURCES) \
$(dpapview_VALABUILTSOURCES) \
$(dpapview_VALABUILTSOURCES)
endif
libdmapsharing-2.9.41/tests/test-dmap-container-db.h 0000644 0002115 0001752 00000004061 13701471120 017263 0000000 0000000 /*
* Database class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __TEST_DMAP_CONTAINER_DB
#define __TEST_DMAP_CONTAINER_DB
#include
G_BEGIN_DECLS
#define TYPE_TEST_DMAP_CONTAINER_DB (test_dmap_container_db_get_type ())
#define TEST_DMAP_CONTAINER_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDb))
#define TEST_DMAP_CONTAINER_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
#define IS_TEST_DMAP_CONTAINER_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_CONTAINER_DB))
#define IS_TEST_DMAP_CONTAINER_DB_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_CONTAINER_DB_CLASS))
#define TEST_DMAP_CONTAINER_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
typedef struct TestDMAPContainerDbPrivate TestDMAPContainerDbPrivate;
typedef struct {
GObject parent;
} TestDMAPContainerDb;
typedef struct {
GObjectClass parent;
} TestDMAPContainerDbClass;
TestDMAPContainerDb *test_dmap_container_db_new (DMAPContainerRecord *record);
GType test_dmap_container_db_get_type (void);
#endif /* __TEST_DMAP_CONTAINER_DB */
G_END_DECLS
libdmapsharing-2.9.41/tests/test-dmap-container-db.c 0000644 0002115 0001752 00000005056 13701471120 017263 0000000 0000000 /*
* Database class for DMAP sharing
*
* Copyright (C) 2008 W. Michael Petullo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "test-dmap-container-db.h"
/* This test implementation of the DMAPContainerDb interface allows for one
* record. Normally, one would befine some data structure to contain
* multiple records.
*/
static DMAPContainerRecord *record = NULL;
static DMAPContainerRecord *
test_dmap_container_db_lookup_by_id (DMAPContainerDb *db, guint id)
{
/* In reality, lookup the proper record and return it. */
return g_object_ref (record);
}
static void
test_dmap_container_db_foreach (DMAPContainerDb *db,
GHFunc func,
gpointer data)
{
/* In reality, pull each record from the db and execute func on it. */
func (GUINT_TO_POINTER (1), record, data);
}
static gint64
test_dmap_container_db_count (DMAPContainerDb *db)
{
/* In reality, return the record count. */
return 1;
}
static void
test_dmap_container_db_init (TestDMAPContainerDb *db)
{
}
static void
test_dmap_container_db_class_init (TestDMAPContainerDbClass *klass)
{
}
static void
test_dmap_container_db_interface_init (gpointer iface, gpointer data)
{
DMAPContainerDbIface *dmap_container_db = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_container_db) == DMAP_TYPE_CONTAINER_DB);
dmap_container_db->lookup_by_id = test_dmap_container_db_lookup_by_id;
dmap_container_db->foreach = test_dmap_container_db_foreach;
dmap_container_db->count = test_dmap_container_db_count;
}
G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerDb, test_dmap_container_db, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_DB,
test_dmap_container_db_interface_init))
TestDMAPContainerDb *
test_dmap_container_db_new (DMAPContainerRecord *r)
{
TestDMAPContainerDb *db;
db = TEST_DMAP_CONTAINER_DB (g_object_new (TYPE_TEST_DMAP_CONTAINER_DB, NULL));
record = r;
return db;
}
libdmapsharing-2.9.41/tests/dmapcopy.vala 0000644 0002115 0001752 00000006071 13701471120 015335 0000000 0000000 /* FILE: dmapcopy.vala -- Copy files from a DMAP server
* AUTHOR: W. Michael Petullo
* DATE: 20 December 2010
*
* Copyright (c) 2010 W. Michael Petullo
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
private class DPAPCopy {
private DMAP.MdnsBrowser browser;
private DMAP.Connection connection;
private ValaDMAPDb db;
private ValaDPAPRecordFactory factory;
private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
db.foreach ((k, v) => {
stdout.printf ("%s\n", ((ValaDPAPRecord) v).location);
/* Uncomment to copy the data:
var session = new Soup.SessionAsync ();
var message = new Soup.Message ("GET", ((ValaDPAPRecord) v).location);
message.request_headers = connection.get_headers (((ValaDPAPRecord) v).location);
GLib.debug ("GET %s", ((ValaDPAPRecord) v).location);
session.send_message (message);
var file = File.new_for_path (((int) k).to_string ());
var file_stream = file.create (FileCreateFlags.NONE);
// Test for the existence of file
if (file.query_exists ()) {
stdout.printf ("File successfully created.\n");
}
// Write text data to file
var data_stream = new DataOutputStream (file_stream);
data_stream.write (message.response_body.data, (size_t) message.response_body.length, null);
*/
});
return true;
}
private void service_added_cb (DMAP.MdnsBrowserService *service) {
connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, db, factory);
connection.connect (connected_cb);
}
public DPAPCopy () throws GLib.Error {
db = new ValaDMAPDb ();
factory = new ValaDPAPRecordFactory ();
browser = new DMAP.MdnsBrowser (DMAP.MdnsBrowserServiceType.DPAP);
browser.service_added.connect (service_added_cb);
browser.start ();
}
}
void debug_printf (string? log_domain,
GLib.LogLevelFlags log_level,
string? message)
{
stdout.printf ("%s\n", message);
}
void debug_null (string? log_domain,
GLib.LogLevelFlags log_level,
string? message)
{
}
int main (string[] args) {
var loop = new GLib.MainLoop ();
GLib.Log.set_handler ("libdmapsharing", GLib.LogLevelFlags.LEVEL_DEBUG, debug_null);
GLib.Log.set_handler (null, GLib.LogLevelFlags.LEVEL_DEBUG, debug_null);
var dmapcopy = new DPAPCopy ();
loop.run ();
return 0;
}
libdmapsharing-2.9.41/README-Memory 0000644 0002115 0001752 00000007036 12331133503 013640 0000000 0000000 This documents the effort to make dmapd and libdmapsharing more memory
efficient. This document describes work done in both libdmapsharing and
dmapd, because dmapd is the primary application of libdmapsharing's
server-side functionality.
I found that dmapd used a significant amount of heap space while trying to
port dmapd to OpenWRT on a WRT160NL router with 32 Megabytes of RAM. A
2,419-song library caused dmapd on x86_64 to use 7,413,760 bytes of heap
space after reading the library into memory. Furthermore, connecting to
dmapd using a DAAP client and receiving a list of songs caused heap usage
to increase to over 10 Megabytes. Note that this memory usage might be
smaller on the WRT160NL due to its 32-bit architecture, but it is still
significant in size.
After attempting to optimize memory use, I measured the following on
OpenWrt / WRT160NL (*** BUT WITH NO METADATA READ! ***):
Heap, after music is loaded: 0xf5000 (1,003,520)
Heap, after client received song list: 0x926000 (9,592,832)
SOME METADATA (MP3 ONLY):
Heap, after music is loaded: 0x2d3000 (2,961,408)
Heap, after client received song list: 0xafa000 (11,509,760)
I use the following tools to troubleshoot memory issues:
grep heap /proc/PID/maps (current heap size)
valgrind / memcheck (memory leaks)
valgrind / massif (max heap size and memory over time)
gdb
objdump -t OBJECT-FILE | grep -e "\.bss" -e "\.data" | sort -k5
| c++filt | tail
I have made the following changes in order to make dmapd more memory
efficient:
1. Replace the hash table-based DMAPDb implementation with a Berkeley
Database implementation. Currently measuring the memory use compared to
the in-memory database.
2. Fixed several memory leaks after analyzing with valgrind.
Heap without client connection: 3,940,352 bytes
3. Implement database cache so that dmapd does not need to use GStreamer
to read media metadata each time it is run.
Heap without client connection using DB cache: 3,346,432 bytes
4. Replace the DMAPDb in the DMAPContainerRecord implementation with a
GSList of ID's.
Heap without client connection using DB cache: 4,759,552 bytes
5. Implement "stringletons" and fix errors in 4) above.
Heap without client connection using DB cache: 2,854,912 bytes
Heap without client connection: 3,518,464 bytes
Heap after client connection and song list: 6,864,896 bytes
Max heap usages (massif): 8,945,760 bytes
6. Modify libdmapsharing so that it responds to "/1/items" requests in
chunks, avoiding the need to build the entire response in memory.
The effectiveness of this can be measured by observing the
maximum heap usage after a client has asked for a full media
list. Previous to this change, dmapd would use 7,811,072 bytes
of heap to describe a 2,232-song library. After this change,
dmapd's usage was 3,665,920 bytes, a very small increase over
the memory used by dmapd immediately after starting.
7. Write a disk-based database for dmapd.
In order to minimize the memory used by a newly started dmapd,
I wrote a disk-based DMAPDb backend. This backend stores all
database data in files and avoids storing the entire database
in memory. To measure the effectiveness, I measured the memory
usage of dmapd after loading a 3,276-photograph library (note
that thumbnails are especially problematic). The GHashTable-based
database used 35,885,056 bytes of heap space. The disk-based
database used 4,763,648 bytes.
8. Decompressing multiple scan JPEG's.
VIPS must decompress multiple scan JPEG's fully in memory due
to the way libjpeg works. Either 1) use embedded EXIF thumbnail
or 2) skip.
libdmapsharing-2.9.41/config.h.in 0000644 0002115 0001752 00000004146 13701471264 013547 0000000 0000000 /* config.h.in. Generated from configure.ac by autoheader. */
/* maximum glib version */
#undef GLIB_VERSION_MAX_ALLOWED
/* minimum glib version */
#undef GLIB_VERSION_MIN_REQUIRED
/* Define if check support is enabled */
#undef HAVE_CHECK
/* Define to 1 if you have the header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the header file. */
#undef HAVE_DNS_SD_H
/* Define if gdk-pixbuf support is enabled */
#undef HAVE_GDKPIXBUF
/* Define if GStreamer App support is enabled */
#undef HAVE_GSTREAMERAPP
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Defined when tests are to be built */
#undef TESTS_ENABLED
/* Version number of package */
#undef VERSION
libdmapsharing-2.9.41/COPYING 0000644 0002115 0001752 00000063637 12331133540 012557 0000000 0000000
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. 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 not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the 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
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
libdmapsharing-2.9.41/compile 0000755 0002115 0001752 00000016327 13250314767 013111 0000000 0000000 #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
libdmapsharing-2.9.41/autogen.sh 0000755 0002115 0001752 00000036613 13700474522 013530 0000000 0000000 #!/bin/sh
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd "$srcdir"
touch ChangeLog
gtkdocize || exit 1
aclocal -I m4 || exit 1
autoconf || exit 1
autoheader || exit 1
libtoolize --force || glibtoolize --force || exit 1
automake -a || exit 1
cd "$olddir"
test -n "$NOCONFIGURE" || "$srcdir/configure" $@ || exit 1
# Now populate ChangeLog.
git log > "$srcdir/ChangeLog"
cat <> "$srcdir/ChangeLog"
======================== Convert to Git-based ChangeLog ========================
= Please note that there is is a period where some changes were logged in the =
= ChangeLog and others in Git. This may be present between August 2009 and =
= November 2010. =
================================================================================
19 November 2010 W. Michael Petullo
* Change Content-Type to consistently be application/x-dmap-tagged
after getting a bug report from Michael Miceli. I confirmed that
iTunes uses this content type (not application/x-daap-tagged)
when sharing music.
* Move over-anxious g_object_unref in _dmap_share_databases that
resulted in corrupt DPAP thumbnails when using DmapdDMAPDbDisk.
18 November 2010 W. Michael Petullo
* Fix problem sharing to iTunes due to incorrect Content-Length
* Bump version number.
* Don't set Connection: Close header in response to /databases/1/items (iTunes)
11 November 2010 W. Michael Petullo
* Bump version number.
07 November 2010 W. Michael Petullo
* Significant work on an interim solution for the problem
of memory usage while building the "/1/items" response. We
previously simply called foreach...add_entry_to_mlcl and later
serialized the entire structure. This has the disadvantage that
the entire response must be in memory before libsoup sends it
to the client. Now, we transmit portions at a time.
31 October 2010 W. Michael Petullo
* Bump version number.
24 October 2010 W. Michael Petullo
* Fix _dmap_share_build_filter to support commas in values.
23 October 2010 W. Michael Petullo
* Provide a configuration-time warning if libsoup < 2.32; this
is required to interact with Apple Remote App.
21 October 2010 W. Michael Petullo
* Advertise support for dmap.supportsupdate even though we don't
support it. This should fix DACP interaction with Apple Remote
v2.0.1 (229). Add real support for dmap.supportsupdate to TODO.
16 October 2010 W. Michael Petullo
* Add terminating record to meta_data_map in dpap-share.c.
01 October 2010 W. Michael Petullo
* Fix missed "daap.songX" to "songX" change.
29 September 2010 W. Michael Petullo
* Fix some bugs related to the recent DmapMdnsPublisher singleton
change.
09 September 2010 W. Michael Petullo
* Allow two sub-DMAP protocols (e.g., DAAP and DPAP) in one
process.
07 September 2010 W. Michael Petullo
* Allow dmap-mdns-*-dnssd.c to compile.
06 September 2010 W. Michael Petullo
* Fix serving to iTunes 10.
03 September 2010 W. Michael Petullo
* Fix license notice on several source files.
* Fix license on dacp-player.[ch] after receiving confirmation
from Alexandre.
* Fix license on test-dmap-client.c after receiving confirmation
from Andre.
20 August 2010 W. Michael Petullo
* Back out Alexandre's addition of itemid property from
DAAPRecord. The itemid is the DMAPDb ID.
20 August 2010 Alexandre Rosenfeld
* Apply Alexandre Rosenfeld's DACP patch from Google Summer of
Code 2010.
22 July 2010 W. Michael Petullo
* Remove redundancy between dmap_connection_build_message()
and dmap_connection_build_message().
04 June 2010 W. Michael Petullo
* Add dmap_db_add_with_id() to DMAPDb interface.
* dmap_container_record_get_entries() must not return a const
because the return value should be free'd.
01 June 2010 W. Michael Petullo
* Unref value returned by dmap_container_record_get_entries().
* Free strings returned by g_object_get().
30 May 2010 W. Michael Petullo
* Change lookup_by_path() to lookup_by_location().
29 May 2010 W. Michael Petullo
* Add blob functions to DMAPRecord interface.
* Add lookup_by_path() to DMAPDb.
* Add add_path() to DMAPDb.
* Ensure dmap_container_db_lookup_by_id(),
dmap_container_record_get_id() and dmap_db_lookup_by_id() all
deal with guint ids.
28 May 2010 W. Michael Petullo
* Install dmap-md5.h.
27 May 2010 W. Michael Petullo
* Fix crash upon finalizing DMAPShare that was caused by misuse of
avahi_entry_group_free().
* Increase the reference count of the databases passed to
d[ap]ap_share_new().
* dmap_db_lookup_by_id now takes a const DMAPDb *.
* Add a _dmap_share_build_filter() prototype.
25 May 2010 W. Michael Petullo
* Refactor build_filter into dmap_share_build_factor.
* Begin naming D[AP]APRecord properties after DAAP keywords so
that direct use of g_object_get can replace if/else or table
lookups.
* Fix some declarations in dmap-db.c so that record IDs are
always guint (vs. gint).
24 May 2010 W. Michael Petullo
* Refactor DMAPShare, DAAPShare and DPAPShare to move code
to DMAPShare and increase code reuse.
22 May 2010 W. Michael Petullo
* Add new to_blob/new_from_blob interface to D[AP]PRecord.
20 May 2010 W. Michael Petullo
* Fix finalize code for DMAPShare.
18 May 2010 W. Michael Petullo
* Add another case to dpap-share.c:build_filter() in an attempt
to support iTunes '09.
16 May 2010 W. Michael Petullo
* Documentation work.
07 May 2010 W. Michael Petullo
* Send artist and album sort order to DAAP clients.
17 March 2010 W. Michael Petullo
* Make _dmap_share_add_playlist_to_mlcl a proper GHashFunc.
15 March 2010 W. Michael Petullo
* Set def. and min. value of track, year and disc to 0 (not 1) in
DAAPRecord.
* Use -D instead of dmap-priv.h to define G_LOG_DOMAIN.
11 March 2010 W. Michael Petullo
* Add user agent header to requests (Rhythmbox bug #610440).
* Fix URI handling when using IPv6 IP address (Rhythmbox bug #584244).
27 February 2010 W. Michael Petullo
* Change dmap_connection_get_headers so that it no longer takes a
bytes argument and returns a SoupMessageHeaders *. This is to remain
compatible with Rhythmbox.
12 December 2009 W. Michael Petullo
* Fixed debug statement that caused segfaults of MIPS32 and
PowerPC.
05 December 2009 W. Michael Petullo
* Use our own log domain.
28 November 2009 W. Michael Petullo
* Change configure script to require avahi, howl OR DNS_SD.H.
28 August 2009 W. Michael Petullo
* Make dmap_record_factory_create more generic, take gpointer
user_data instead of path.
27 August 2009 W. Michael Petullo
* Fix daap_connection_new, take password_required.
* Use typedef's for function arguments.
* DMAPDb foreach function now takes GHFunc.
22 August 2009 W. Michael Petullo
* Work on dns_sd mDNS backend.
* Make autogen.sh work with MacPorts.
17 August 2009 W. Michael Petullo
* Update tests to include dmap.h.
* Ensure values g_free'd before set in D[AP]APRecord's
set_properties.
* Add dmap-mdns-publisher.h back to installed headers.
16 August 2009 W. Michael Petullo
* Add finalize function for TestDAAPRecord and TestDPAPRecord.
15 August 2009 W. Michael Petullo
* Documentation.
* Add progress idle function to dmap-connection.c.
* Install dmap-mdns-browser.h again.
14 August 2009 W. Michael Petullo
* Add documentation overview.
13 August 2009 W. Michael Petullo
* Proper reference counting for DMAPRecords in DMAPDbs.
* Documentation work.
12 August 2009 W. Michael Petullo
* Simplify autogen.sh.
30 July 2009 W. Michael Petullo
* Modify configure.ac to require gstreamer-plugins-base >=
0.10.23.2 for GNOME Bugzilla #588205 & #587896.
* Remove newly obsolete code (daap-item.c, etc.)
* Auto-generate marshaling code for dmap-connection.c.
29 July 2009 W. Michael Petullo
* Port tests to new client API.
28 July 2009 W. Michael Petullo
* More rhythmbox-related work.
27 July 2009 W. Michael Petullo
* Rhythmbox-related work.
25 July 2009 W. Michael Petullo
* Pull DMAPConnection from more modern Rhythmbox in preparation
of implementing libdmapsharing-base Rhythmbox DAAP plugin.
22 July 2009 W. Michael Petullo
* D[AP]APRecord no longer had DMAPRecord as parent.
* Fixed various runtime warnings.
21 July 2009 W. Michael Petullo
* Fix handling of DAAP filesize.
* Work on seeking.
18 July 2009 W. Michael Petullo
* Fix various GLib Warnings.
13 July 2009 W. Michael Petullo
* Fix bug where the first stream/pipeline continues after
a fast forwarding to a second.
11 July 2009 W. Michael Petullo
* Change some g_warning's to g_debug.
10 July 2009 W. Michael Petullo
* Fix HTTP encoding decision in daap-share.c.
09 July 2009 W. Michael Petullo
* Fix use of giostream element (two upstream GStreamer bugs
fixed in the process).
06 July 2009 W. Michael Petullo
* Make all GStreamer / transcoding code optional.
05 July 2009 W. Michael Petullo
* Move transcoding to libdmapsharing.
02 July 2009 W. Michael Petullo
* Get rid of get methods in daap-record.c and replace with
GObject properties.
17 June 2009 W. Michael Petullo
* Slight API change to support delaying trancoding decisions
until after a file has been requested.
30 April 2009 W. Michael Petullo
* Fix compiler warning.
* Update RPM specification.
19 April 2009 W. Michael Petullo
* Fix memory leaks in dmap-db.c's filter code.
18 April 2009 W. Michael Petullo
* Start to implement dmap-mdns-browser-dnssd.c and
dmap-mdns-publisher-dnssd.c -- still needs work.
11 April 2009 W. Michael Petullo
* Add support for Apple's DNSSD to configure.ac.
10 April 2009 W. Michael Petullo
* Clean up some compiler warnings.
07 April 2009 W. Michael Petullo
* Completed DAAP browsing.
05 April 2009 W. Michael Petullo
* Filtering now works.
04 April 2009 W. Michael Petullo
* Work on DAAP browsing, start support for filter.
31 March 2009 W. Michael Petullo
* Began supporting DAAP browsing (e.g., list genres).
30 March 2009 W. Michael Petullo
* Set rating in daap-share.c.
29 March 2009 W. Michael Petullo
* Fix compiler warnings related to const return from
dmap_container_record_get_entries.
28 March 2009 W. Michael Petullo
* Fix support for Roku clients; they use query parameter, much
like iPhoto.
* Update pkg-config file to support includedir & libdir in terms
of prefix.
26 March 2009 W. Michael Petullo
* Work on seeking.
* Add new DAAPRecord method: itunes_compat.
24 March 2009 W. Michael Petullo
* Make dmap_container_record_get_entries return a const DMAPDb *.
* Remove commented out mmap code from daap-share.c.
07 March 2009 W. Michael Petullo
* Fix Cflags in libdmapsharing.pc.in.
06 March 2009 W. Michael Petullo
* Use @libdir@ in libdmapsharing.pc.in to support 64-bit
architectures.
* Do not include - in SONAME.
* Set LDFLAGS properly when building libdmapsharing.
* Update RPM specification file.
02 March 2009 W. Michael Petullo
* Fix some issues that broke compiling on 64-bit platforms.
28 February 2009 W. Michael Petullo
* Support building with older versions of libsoup, just don't
build HTTP 1.0 / SOUP_ENCODING_EOF support.
27 February 2009 W. Michael Petullo
* Always use content length encoding for video data, as iTunes
seems to require this.
22 February 2009 W. Michael Petullo
* Require libsoup >= 2.25.92, as this version supports
SOUP_ENCODING_EOF message encoding, required for HTTP 1.0 clients.
* Decrease DMAP_SHARE_CHUNK_SIZE now that the Roku SoundBridge is
properly handled as a HTTP 1.0 client.
12 February 2009 W. Michael Petullo
* dmap_container_record_get_entries now returns a DMAPDb *
instead of a GSList *.
* Increase DMAP_SHARE_CHUNK_SIZE in order to keep Roku SoundBridge
client from popping.
* Send proper count to client when providing list of containers.
02 February 2009 W. Michael Petullo
* Bump version number to 1.9 in preparation for release.
31 January 2009 W. Michael Petullo
* Slight change to DAAPRecord and DPAPRecord interfaces. Add
read method that returns GInputStream * (instead of simply the
location/path). This sets the conditions for realtime transcoding
done by interface implementations.
25 January 2009 W. Michael Petullo
* Don't try to mmap large files for DAAP sharing; they may be
large videos that could cause the server to thrash.
19 January 2009 W. Michael Petullo
* Add a DMAP record factory interface.
18 January 2009 W. Michael Petullo
* Support sharing video (Quicktime for now).
* Merge DAAPDb and DPAPDb interfaces into DMAPDb.
10 January 2009 W. Michael Petullo
* Update libdmapsharing.spec.
09 January 2009 W. Michael Petullo
* Format some code better.
* Release mmap'ed files before mmap'ing another one.
* Implement sharing of playlists / albums.
08 January 2009 W. Michael Petullo
* Add to README.
* Format some code better.
* Update license headings.
07 January 2009 W. Michael Petullo
* Add library version to build system.
* Remove fork from dmap-test-server.c.
* Consolidate parsing of meta-data portion of query in dmap-share.c.
06 January 2009 W. Michael Petullo
* Add Fedora RPM spec file.
05 January 2009 W. Michael Petullo
* Fix test code to work with new thumbnail interface.
01 January 2009 W. Michael Petullo
* Reengineered database code.
30 December 2008 W. Michael Petullo
* DPAP sharing now works with iPhoto 6.
28 December 2008 W. Michael Petullo
* DAAP sharing now works with iTunes 8.
26 December 2008 W. Michael Petullo
* Split DAAP sharing functionality into two classes: DMAPShare
and DAAPShare. DAAPShare is a subclass of DMAPShare.
* Start work on DPAP server code.
21 December 2008 W. Michael Petullo
* Moved daap_mdns_publisher* to dmap_mdns_publisher*.
* Make type_of_service (e.g., _daap._tcp) configurable in
dmap_mdns_publisher*.
18 December 2008 W. Michael Petullo
* Begin implementing server code.
18 December 2008 W. Michael Petullo
* Update to compile against libsoup-2.24.
EOF
exit 0
libdmapsharing-2.9.41/config.guess 0000755 0002115 0001752 00000126173 13614025077 014051 0000000 0000000 #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2018-08-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to .
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
tmp=
# shellcheck disable=SC2172
trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
set_cc_for_build() {
: "${TMPDIR=/tmp}"
# shellcheck disable=SC2039
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
dummy=$tmp/dummy
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c"
for driver in cc gcc c89 c99 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$driver"
break
fi
done
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac
}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
set_cc_for_build
cat <<-EOF > "$dummy.c"
#include
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
# If ldd exists, use it to detect musl libc.
if command -v ldd >/dev/null && \
ldd --version 2>&1 | grep -q ^musl
then
LIBC=musl
fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
"/sbin/$sysctl" 2>/dev/null || \
"/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
machine="${arch}${endian}"-unknown
;;
*) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
case "$UNAME_MACHINE_ARCH" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# Determine ABI tags.
case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
exit ;;
*:MidnightBSD:*:*)
echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
*:Redox:*:*)
echo "$UNAME_MACHINE"-unknown-redox
exit ;;
mips:OSF1:*.*)
echo mips-dec-osf1
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
case `isainfo -b` in
32)
echo i386-pc-solaris2"$UNAME_REL"
;;
64)
echo x86_64-pc-solaris2"$UNAME_REL"
;;
esac
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
[ "$TARGET_BINARY_INTERFACE"x = x ]
then
echo m88k-dg-dgux"$UNAME_RELEASE"
else
echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
case "$UNAME_MACHINE" in
9000/31?) HP_ARCH=m68000 ;;
9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "$HP_ARCH" = "" ]; then
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include
#include
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ "$HP_ARCH" = hppa2.0w ]
then
set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH=hppa2.0w
else
HP_ARCH=hppa64
fi
fi
echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo "$UNAME_MACHINE"-unknown-osf1mk
else
echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
arm:FreeBSD:*:*)
UNAME_PROCESSOR=`uname -p`
set_cc_for_build
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
else
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
fi
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in
amd64)
UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
case "$UNAME_MACHINE" in
x86)
echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
i*:UWIN*:*)
echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
*:Minix:*:*)
echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
*) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
i*86:*:4.*:*)
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes