Browse Source

Remove obsolete svn directories.

tags/r14.0.0^0
Darrell Anderson 6 years ago
parent
commit
074fd7751d

+ 0
- 137
src/.svn/all-wcprops View File

@@ -1,137 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 40
/svnroot/libcaldav/!svn/ver/42/trunk/src
END
delete-caldav-object.c
K 25
svn:wc:ra_dav:version-url
V 63
/svnroot/libcaldav/!svn/ver/41/trunk/src/delete-caldav-object.c
END
caldav.h
K 25
svn:wc:ra_dav:version-url
V 49
/svnroot/libcaldav/!svn/ver/39/trunk/src/caldav.h
END
get-display-name.c
K 25
svn:wc:ra_dav:version-url
V 59
/svnroot/libcaldav/!svn/ver/41/trunk/src/get-display-name.c
END
Makefile.in
K 25
svn:wc:ra_dav:version-url
V 52
/svnroot/libcaldav/!svn/ver/42/trunk/src/Makefile.in
END
delete-caldav-object.h
K 25
svn:wc:ra_dav:version-url
V 62
/svnroot/libcaldav/!svn/ver/1/trunk/src/delete-caldav-object.h
END
get-display-name.h
K 25
svn:wc:ra_dav:version-url
V 58
/svnroot/libcaldav/!svn/ver/1/trunk/src/get-display-name.h
END
get-caldav-report.c
K 25
svn:wc:ra_dav:version-url
V 60
/svnroot/libcaldav/!svn/ver/41/trunk/src/get-caldav-report.c
END
modify-caldav-object.c
K 25
svn:wc:ra_dav:version-url
V 63
/svnroot/libcaldav/!svn/ver/41/trunk/src/modify-caldav-object.c
END
lock-caldav-object.c
K 25
svn:wc:ra_dav:version-url
V 61
/svnroot/libcaldav/!svn/ver/41/trunk/src/lock-caldav-object.c
END
add-caldav-object.c
K 25
svn:wc:ra_dav:version-url
V 60
/svnroot/libcaldav/!svn/ver/41/trunk/src/add-caldav-object.c
END
get-caldav-report.h
K 25
svn:wc:ra_dav:version-url
V 60
/svnroot/libcaldav/!svn/ver/39/trunk/src/get-caldav-report.h
END
md5.c
K 25
svn:wc:ra_dav:version-url
V 45
/svnroot/libcaldav/!svn/ver/1/trunk/src/md5.c
END
options-caldav-server.c
K 25
svn:wc:ra_dav:version-url
V 64
/svnroot/libcaldav/!svn/ver/41/trunk/src/options-caldav-server.c
END
caldav-utils.c
K 25
svn:wc:ra_dav:version-url
V 55
/svnroot/libcaldav/!svn/ver/42/trunk/src/caldav-utils.c
END
Makefile.am
K 25
svn:wc:ra_dav:version-url
V 52
/svnroot/libcaldav/!svn/ver/39/trunk/src/Makefile.am
END
modify-caldav-object.h
K 25
svn:wc:ra_dav:version-url
V 62
/svnroot/libcaldav/!svn/ver/1/trunk/src/modify-caldav-object.h
END
lock-caldav-object.h
K 25
svn:wc:ra_dav:version-url
V 60
/svnroot/libcaldav/!svn/ver/9/trunk/src/lock-caldav-object.h
END
add-caldav-object.h
K 25
svn:wc:ra_dav:version-url
V 59
/svnroot/libcaldav/!svn/ver/1/trunk/src/add-caldav-object.h
END
caldav.c
K 25
svn:wc:ra_dav:version-url
V 49
/svnroot/libcaldav/!svn/ver/39/trunk/src/caldav.c
END
md5.h
K 25
svn:wc:ra_dav:version-url
V 45
/svnroot/libcaldav/!svn/ver/1/trunk/src/md5.h
END
options-caldav-server.h
K 25
svn:wc:ra_dav:version-url
V 64
/svnroot/libcaldav/!svn/ver/10/trunk/src/options-caldav-server.h
END
caldav-utils.h
K 25
svn:wc:ra_dav:version-url
V 55
/svnroot/libcaldav/!svn/ver/34/trunk/src/caldav-utils.h
END

+ 0
- 776
src/.svn/entries View File

@@ -1,776 +0,0 @@
10

dir
42
https://libcaldav.svn.sourceforge.net/svnroot/libcaldav/trunk/src
https://libcaldav.svn.sourceforge.net/svnroot/libcaldav



2010-05-29T15:45:56.236020Z
42
miras














6bb92309-7149-0410-b568-bc30dfd0a1d5
delete-caldav-object.c
file




2010-05-31T07:07:58.000000Z
fab35eb73b0fb9581aa487decd83b6c6
2010-05-25T20:53:04.081178Z
41
miras





















8643
caldav.h
file




2010-05-31T07:07:58.000000Z
8b27bf73c1c7bb060ad21312f5f9af05
2010-05-23T20:43:55.305076Z
39
miras





















11331
get-display-name.c
file




2010-05-31T07:07:58.000000Z
e605700922c480f35815279a20484248
2010-05-25T20:53:04.081178Z
41
miras





















4631
Makefile.in
file




2010-05-31T07:07:58.000000Z
dd17920f8308f34a5cb6f4c546fb59ea
2010-05-29T15:45:56.236020Z
42
miras





















21254
delete-caldav-object.h
file




2010-05-31T07:07:58.000000Z
a73e19682e34e9c903940f3f0fd48435
2008-03-29T18:04:01.076545Z
1
miras





















1244
get-display-name.h
file




2010-05-31T07:07:58.000000Z
78c67f8d08738e976c2decb360d90eac
2008-03-29T18:04:01.076545Z
1
miras





















1240
get-caldav-report.c
file




2010-05-31T07:07:58.000000Z
fd4ef5b191fc0b3a7ea76b14a078e06c
2010-05-25T20:53:04.081178Z
41
miras





















8572
modify-caldav-object.c
file




2010-05-31T07:07:58.000000Z
18119fb7cabfe0a193035aad23ccacef
2010-05-25T20:53:04.081178Z
41
miras





















8992
lock-caldav-object.c
file




2010-05-31T07:07:58.000000Z
d94186940ab1caf2a060ae6bc4a836ca
2010-05-25T20:53:04.081178Z
41
miras





















9360
add-caldav-object.c
file




2010-05-31T07:07:58.000000Z
9272e45b03647c432efbc8d8a6217537
2010-05-25T20:53:04.081178Z
41
miras





















4341
get-caldav-report.h
file




2010-05-31T07:07:58.000000Z
4063fdac318ff1c4b8d5845fd6d526f3
2010-05-23T20:43:55.305076Z
39
miras





















1609
md5.c
file




2010-05-31T07:07:58.000000Z
4c393b2163ae5ab0d8461709e4680b68
2008-03-29T18:04:01.076545Z
1
miras





















11719
options-caldav-server.c
file




2010-05-31T07:07:58.000000Z
bca50708fda598af1cf6c3171bf01e0d
2010-05-25T20:53:04.081178Z
41
miras





















4545
Makefile.am
file




2010-05-31T07:07:58.000000Z
d4e689953457ac1f09d9bc85d4d3e855
2010-05-23T20:43:55.305076Z
39
miras





















1098
modify-caldav-object.h
file




2010-05-31T07:07:58.000000Z
7369d16e16cb3d208a3d576f69685f76
2008-03-29T18:04:01.076545Z
1
miras





















1244
caldav-utils.c
file




2010-05-31T07:07:58.000000Z
fb4b55bfc19b10aba28e8e047a9493bc
2010-05-29T15:45:56.236020Z
42
miras





















17444
lock-caldav-object.h
file




2010-05-31T07:07:58.000000Z
1f07eba06bb4fe89eb8c42a6fb67df55
2008-04-07T22:11:32.666799Z
9
miras





















2088
add-caldav-object.h
file




2010-05-31T07:07:58.000000Z
4f4e1336005bc1eb283696d92ce6075f
2008-03-29T18:04:01.076545Z
1
miras





















1236
caldav.c
file




2010-05-31T07:07:58.000000Z
6307ba82867c515caa761ea0e03c9e0d
2010-05-23T20:43:55.305076Z
39
miras





















21199
md5.h
file




2010-05-31T07:07:58.000000Z
5238bb8df57b98358aa184bb97d686d5
2008-03-29T18:04:01.076545Z
1
miras





















1517
options-caldav-server.h
file




2010-05-31T07:07:58.000000Z
100c2c473b064d0b0c99135a3f8c8992
2010-02-27T11:17:33.222356Z
10
miras





















1774
caldav-utils.h
file




2010-05-31T07:07:58.000000Z
790120ed34d83d7a82dd21e6543c65fc
2010-04-07T22:56:57.177660Z
34
miras





















5300

+ 0
- 53
src/.svn/text-base/Makefile.am.svn-base View File

@@ -1,53 +0,0 @@
AUTOMAKE_OPTIONS = gnu

INCLUDES = @CURL_CFLAGS@ @GLIB_CFLAGS@ \
-I$(top_srcdir) -I$(top_builddir)

if STATIC_LINK
noinst_LTLIBRARIES = libcaldav.la
endif

if DYNAMIC_LINK
lib_LTLIBRARIES = libcaldav.la
endif

libcaldav_la_LDFLAGS = -version-info @LIBVERSION@

libcaldav_la_SOURCES = \
caldav.h \
caldav.c \
add-caldav-object.c \
add-caldav-object.h \
delete-caldav-object.c \
delete-caldav-object.h \
modify-caldav-object.c \
modify-caldav-object.h \
get-caldav-report.c \
get-caldav-report.h \
get-display-name.c \
get-display-name.h \
caldav-utils.c \
caldav-utils.h \
md5.c \
md5.h \
options-caldav-server.c \
options-caldav-server.h \
lock-caldav-object.c \
lock-caldav-object.h \
get-freebusy-report.c \
get-freebusy-report.h

libcaldav_includedir=$(includedir)/libcaldav-@VERSION@
libcaldav_include_HEADERS = caldav.h

noinst_HEADERS = \
add-caldav-object.h \
delete-caldav-object.h \
modify-caldav-object.h \
get-caldav-report.h \
caldav-utils.h

libcaldav_la_LIBADD = \
@CURL_LIBS@ \
@GLIB_LIBS@


+ 0
- 649
src/.svn/text-base/Makefile.in.svn-base View File

@@ -1,649 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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@
target_triplet = @target@
subdir = src
DIST_COMMON = $(libcaldav_include_HEADERS) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_prog_doxygen.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)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(libcaldav_includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libcaldav_la_DEPENDENCIES =
am_libcaldav_la_OBJECTS = caldav.lo add-caldav-object.lo \
delete-caldav-object.lo modify-caldav-object.lo \
get-caldav-report.lo get-display-name.lo caldav-utils.lo \
md5.lo options-caldav-server.lo lock-caldav-object.lo \
get-freebusy-report.lo
libcaldav_la_OBJECTS = $(am_libcaldav_la_OBJECTS)
libcaldav_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libcaldav_la_LDFLAGS) $(LDFLAGS) -o $@
@DYNAMIC_LINK_TRUE@am_libcaldav_la_rpath = -rpath $(libdir)
@STATIC_LINK_TRUE@am_libcaldav_la_rpath =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libcaldav_la_SOURCES)
DIST_SOURCES = $(libcaldav_la_SOURCES)
HEADERS = $(libcaldav_include_HEADERS) $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURL_CFLAGS = @CURL_CFLAGS@
CURL_LIBS = @CURL_LIBS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DX_CONFIG = @DX_CONFIG@
DX_DOCDIR = @DX_DOCDIR@
DX_DOT = @DX_DOT@
DX_DOXYGEN = @DX_DOXYGEN@
DX_DVIPS = @DX_DVIPS@
DX_EGREP = @DX_EGREP@
DX_ENV = @DX_ENV@
DX_FLAG_chi = @DX_FLAG_chi@
DX_FLAG_chm = @DX_FLAG_chm@
DX_FLAG_doc = @DX_FLAG_doc@
DX_FLAG_dot = @DX_FLAG_dot@
DX_FLAG_html = @DX_FLAG_html@
DX_FLAG_man = @DX_FLAG_man@
DX_FLAG_pdf = @DX_FLAG_pdf@
DX_FLAG_ps = @DX_FLAG_ps@
DX_FLAG_rtf = @DX_FLAG_rtf@
DX_FLAG_xml = @DX_FLAG_xml@
DX_HHC = @DX_HHC@
DX_LATEX = @DX_LATEX@
DX_MAKEINDEX = @DX_MAKEINDEX@
DX_PDFLATEX = @DX_PDFLATEX@
DX_PERL = @DX_PERL@
DX_PROJECT = @DX_PROJECT@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBVERSION = @LIBVERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
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@
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@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
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@
lt_ECHO = @lt_ECHO@
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 = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = gnu
INCLUDES = @CURL_CFLAGS@ @GLIB_CFLAGS@ \
-I$(top_srcdir) -I$(top_builddir)

@STATIC_LINK_TRUE@noinst_LTLIBRARIES = libcaldav.la
@DYNAMIC_LINK_TRUE@lib_LTLIBRARIES = libcaldav.la
libcaldav_la_LDFLAGS = -version-info @LIBVERSION@
libcaldav_la_SOURCES = \
caldav.h \
caldav.c \
add-caldav-object.c \
add-caldav-object.h \
delete-caldav-object.c \
delete-caldav-object.h \
modify-caldav-object.c \
modify-caldav-object.h \
get-caldav-report.c \
get-caldav-report.h \
get-display-name.c \
get-display-name.h \
caldav-utils.c \
caldav-utils.h \
md5.c \
md5.h \
options-caldav-server.c \
options-caldav-server.h \
lock-caldav-object.c \
lock-caldav-object.h \
get-freebusy-report.c \
get-freebusy-report.h

libcaldav_includedir = $(includedir)/libcaldav-@VERSION@
libcaldav_include_HEADERS = caldav.h
noinst_HEADERS = \
add-caldav-object.h \
delete-caldav-object.h \
modify-caldav-object.h \
get-caldav-report.h \
caldav-utils.h

libcaldav_la_LIBADD = \
@CURL_LIBS@ \
@GLIB_LIBS@

all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: 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__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}

uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done

clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done

clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libcaldav.la: $(libcaldav_la_OBJECTS) $(libcaldav_la_DEPENDENCIES)
$(libcaldav_la_LINK) $(am_libcaldav_la_rpath) $(libcaldav_la_OBJECTS) $(libcaldav_la_LIBADD) $(LIBS)

mostlyclean-compile:
-rm -f *.$(OBJEXT)

distclean-compile:
-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add-caldav-object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caldav-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caldav.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete-caldav-object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-caldav-report.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-display-name.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-freebusy-report.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock-caldav-object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modify-caldav-object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options-caldav-server.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<

.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
-rm -f *.lo

clean-libtool:
-rm -rf .libs _libs
install-libcaldav_includeHEADERS: $(libcaldav_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(libcaldav_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libcaldav_includedir)"
@list='$(libcaldav_include_HEADERS)'; test -n "$(libcaldav_includedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcaldav_includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(libcaldav_includedir)" || exit $$?; \
done

uninstall-libcaldav_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libcaldav_include_HEADERS)'; test -n "$(libcaldav_includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(libcaldav_includedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libcaldav_includedir)" && rm -f $$files

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS

TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
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
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
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"

distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(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 $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libcaldav_includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

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-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am

distclean: distclean-am
-rm -rf ./$(DEPDIR)
-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-libcaldav_includeHEADERS

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am: install-libLTLIBRARIES

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 -rf ./$(DEPDIR)
-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: uninstall-libLTLIBRARIES \
uninstall-libcaldav_includeHEADERS

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
ctags 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-libLTLIBRARIES \
install-libcaldav_includeHEADERS 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 uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-libcaldav_includeHEADERS


# 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:

+ 0
- 131
src/.svn/text-base/add-caldav-object.c.svn-base View File

@@ -1,131 +0,0 @@
/* vim: set textwidth=80 tabstop=4: */

/* Copyright (c) 2008 Michael Rasmussen (mir@datanom.net)
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "add-caldav-object.h"
#include <glib.h>
#include <curl/curl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/**
* Function for adding a new event.
* @param settings A pointer to caldav_settings. @see caldav_settings
* @param error A pointer to caldav_error. @see caldav_error
* @return TRUE in case of error, FALSE otherwise.
*/
gboolean caldav_add(caldav_settings* settings, caldav_error* error) {
CURL* curl;
CURLcode res = 0;
char error_buf[CURL_ERROR_SIZE];
struct config_data data;
struct MemoryStruct chunk;
struct MemoryStruct headers;
struct curl_slist *http_header = NULL;
gboolean result = FALSE;
gchar* url;

chunk.memory = NULL; /* we expect realloc(NULL, size) to work */
chunk.size = 0; /* no data at this point */
headers.memory = NULL;
headers.size = 0;

curl = get_curl(settings);
if (!curl) {
error->code = -1;
error->str = g_strdup("Could not initialize libcurl");
g_free(settings->file);
settings->file = NULL;
return TRUE;
}

http_header = curl_slist_append(http_header,
"Content-Type: text/calendar; charset=\"utf-8\"");
http_header = curl_slist_append(http_header, "If-None-Match: *");
http_header = curl_slist_append(http_header, "Expect:");
http_header = curl_slist_append(http_header, "Transfer-Encoding:");
data.trace_ascii = settings->trace_ascii;

curl_easy_setopt(curl, CURLOPT_HTTPHEADER, http_header);
/* send all data to this function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
/* send all data to this function */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, WriteHeaderCallback);
/* we pass our 'headers' struct to the callback function */
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, (void *)&headers);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, (char *) &error_buf);
if (settings->debug) {
curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &data);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
}
gchar* tmp = random_file_name(settings->file);
gchar* s = rebuild_url(settings, NULL);
if (g_str_has_suffix(s, "/")) {
url = g_strdup_printf("%slibcaldav-%s.ics", s, tmp);
}
else {
url = g_strdup_printf("%s/libcaldav-%s.ics", s, tmp);
}
g_free(s);
g_free(tmp);
curl_easy_setopt(curl, CURLOPT_URL, url);
tmp = g_strdup(settings->file);
g_free(settings->file);
settings->file = verify_uid(tmp);
g_free(tmp);
/* enable uploading */
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, settings->file);
curl_easy_setopt (curl, CURLOPT_POSTFIELDSIZE, strlen(settings->file));
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
res = curl_easy_perform(curl);
if (res != 0) {
error->code = -1;
error->str = g_strdup_printf("%s", error_buf);
g_free(settings->file);
settings->file = NULL;
result = TRUE;
}
else {
long code;
res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
if (code != 201) {
error->str = g_strdup(chunk.memory);
error->code = code;
result = TRUE;
}
}
if (chunk.memory)
free(chunk.memory);
if (headers.memory)
free(headers.memory);
curl_slist_free_all(http_header);
curl_easy_cleanup(curl);
return result;
}


+ 0
- 35
src/.svn/text-base/add-caldav-object.h.svn-base View File

@@ -1,35 +0,0 @@
/* vim: set textwidth=80 tabstop=4: */

/* Copyright (c) 2008 Michael Rasmussen (mir@datanom.net)
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef __ADD_CALDAV_OBJECT_H__
#define __ADD_CALDAV_OBJECT_H__

#include "caldav-utils.h"
#include "caldav.h"

/**
* Function for adding a new event.
* @param settings A pointer to caldav_settings. @see caldav_settings
* @param error A pointer to caldav_error. @see caldav_error
* @return TRUE in case of error, FALSE otherwise.
*/
gboolean caldav_add(caldav_settings* settings, caldav_error* error);

#endif


+ 0
- 713
src/.svn/text-base/caldav-utils.c.svn-base View File

@@ -1,713 +0,0 @@
/* vim: set textwidth=80 tabstop=4: */

/* Copyright (c) 2008 Michael Rasmussen (mir@datanom.net)
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "caldav-utils.h"
#include "md5.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <curl/curl.h>
#include <ctype.h>

/**
* This function is burrowed from the libcurl documentation
* @param text
* @param stream
* @param ptr
* @param size
* @param nohex
*/
void dump(const char* text, FILE* stream, char* ptr, size_t size, char nohex) {
size_t i;
size_t c;

unsigned int width=0x10;

if(nohex)
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
for(i=0; i<size; i+= width) {
fprintf(stream, "%04zx: ", i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++) {
if(i+c < size)
fprintf(stream, "%02x ", ptr[i+c]);
else
fputs(" ", stream);
}
}
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stream, "%c",(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
}
fputc('\n', stream); /* newline */
}
fflush(stream);
}

/**
* This function is burrowed from the libcurl documentation
* @param handle
* @param type
* @param data
* @param size
* @param userp
* @return
*/
int my_trace(CURL* handle, curl_infotype type, char* data, size_t size, void* userp) {
struct config_data* config = (struct config_data *)userp;
const char* text;
(void)handle; /* prevent compiler warning */

switch (type) {
case CURLINFO_TEXT:
fprintf(stderr, "== Info: %s", data);
default: /* in case a new one is introduced to shock us */
return 0;
case CURLINFO_HEADER_OUT:
text = "=> Send header";
break;
case CURLINFO_DATA_OUT:
text = "=> Send data";
break;
case CURLINFO_SSL_DATA_OUT:
text = "=> Send SSL data";
break;
case CURLINFO_HEADER_IN:
text = "<= Recv header";
break;
case CURLINFO_DATA_IN:
text = "<= Recv data";
break;
case CURLINFO_SSL_DATA_IN:
text = "<= Recv SSL data";
break;
}
dump(text, stderr, data, size, config->trace_ascii);
return 0;
}

/**
* This function is burrowed from the libcurl documentation
* @param ptr
* @param size
* @return void* to memory region
*/
static void* myrealloc(void* ptr, size_t size) {
/* There might be a realloc() out there that doesn't like reallocing
* NULL pointers, so we take care of it here
* */
if(ptr)
return realloc(ptr, size);
else
return malloc(size);
}

/**
* This function is burrowed from the libcurl documentation
* @param ptr
* @param size
* @param nmemb
* @param data
* @return number of written bytes
*/
size_t WriteMemoryCallback(void* ptr, size_t size, size_t nmemb, void* data) {
size_t realsize = size * nmemb;
struct MemoryStruct* mem = (struct MemoryStruct *)data;
mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1);
if (mem->memory) {
memcpy(&(mem->memory[mem->size]), ptr, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
}
return realsize;
}

/**
* This function is burrowed from the libcurl documentation
* @param ptr
* @param size
* @param nmemb
* @param data
* @return number of written bytes
*/
size_t WriteHeaderCallback(void* ptr, size_t size, size_t nmemb, void* data) {
size_t realsize = size * nmemb;
struct MemoryStruct* mem = (struct MemoryStruct *)data;
mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1);
if (mem->memory) {
memcpy(&(mem->memory[mem->size]), ptr, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
}
return realsize;
}

/*
size_t ReadMemoryCallback(void* ptr, size_t size, size_t nmemb, void* data){
struct MemoryStruct* mem = (struct MemoryStruct *)data;

memcpy(ptr, mem->memory, mem->size);
return mem->size;
}
*/

/**
* Initialize caldav settings structure.
* @param settings @see caldav_settings
*/
void init_caldav_settings(caldav_settings* settings) {
settings->username = NULL;
settings->password = NULL;
settings->url = NULL;
settings->file = NULL;
settings->usehttps = FALSE;
settings->custom_cacert = NULL;
settings->verify_ssl_certificate = TRUE;
settings->debug = FALSE;
settings->trace_ascii = TRUE;
settings->ACTION = UNKNOWN;
settings->start = 0;
settings->end = 0;
}

/**
* Free memory assigned to caldav settings structure.
* @param settings @see caldav_settings
*/
void free_caldav_settings(caldav_settings* settings) {
if (settings->username) {
g_free(settings->username);
settings->username = NULL;
}
if (settings->password) {
g_free(settings->password);
settings->password = NULL;
}
if (settings->url) {
g_free(settings->url);
settings->url = NULL;
}
if (settings->file) {
g_free(settings->file);
settings->file = NULL;
}
if (settings->custom_cacert) {
g_free(settings->custom_cacert);
settings->custom_cacert = NULL;
}
settings->verify_ssl_certificate = TRUE;
settings->usehttps = FALSE;
settings->debug = FALSE;
settings->trace_ascii = TRUE;
settings->ACTION = UNKNOWN;
settings->start = 0;
settings->end = 0;
}

static gchar* place_after_hostname(const gchar* start, const gchar* stop) {
gchar* newpos = NULL;
gchar* pos = (gchar *) stop;
gboolean digit = TRUE;
if (pos && stop && strcmp(start, pos) != 0) {
while (*pos != ':' && strcmp(start, pos) != 0)
--pos;
if (pos > start) {
gchar* tmp = (gchar *) pos + 1;
/* is pos++ a port number */
while (*tmp != '/' && digit) {
if (isdigit(*tmp) != 0) {
digit = TRUE;
tmp++;
}
else
digit = FALSE;
}
if (digit) {
/* pos was a port number */
while (*pos != '@' && strcmp(start, pos) != 0)
--pos;
if (strcmp(start, pos) != 0)
newpos = pos;
}
else {
while (*pos != '@' && pos != stop)
pos++;
if (pos != stop)
newpos = pos;
}
}
else {
/* is a username present */
gchar* tmp = NULL;
while (*pos != '/' && pos != stop) {
if (*pos == '@')
tmp = pos;
pos++;
}
if (tmp && pos != stop)
newpos = tmp;
}
}
return newpos;
}

/**
* Parse URL
* @param settings @see caldav_settings
* @param url String containing URL to collection
*/
void parse_url(caldav_settings* settings, const char* url) {
char* start;
char* pos;
char* end;
char* login;

login = pos = end = start = NULL;
if (!url)
return;
if ((pos = strstr(url, "//")) != NULL) {
/* Does the URL use https ?*/
if (!g_ascii_strncasecmp(url,"https",5) && settings->usehttps == FALSE) {
settings->usehttps=TRUE;
}
start = g_strdup(&(*(pos + 2)));
if ((pos = place_after_hostname(start, strrchr(start, '\0') - 1)) != NULL) {
/* username and/or password present */
login = g_strndup(start, pos - start);
end = pos;
if ((pos = strrchr(login, ':')) != NULL) {
/* both username and password is present */
settings->username = g_strndup(login, pos - login);
settings->password = g_strdup(++pos);
}
else {
/* only username present */
settings->username = g_strdup(login);
settings->password = NULL;
}
g_free(login);
settings->url = g_strdup(++end);
}
else {
/* no username or password present */
settings->url = g_strdup(start);
settings->username = NULL;
settings->password = NULL;
}
g_free(start);
}
}

/**
* Find a specific HTTP header from last request
* @param header HTTP header to search for
* @param headers String of HTTP headers from last request
* @param lowcase Should string be returned in all lower case.
* @return The header found or NULL
*/
#define MAX_TOKENS 2
gchar* get_response_header(
const char* header, gchar* headers, gboolean lowcase) {
gchar* line;
gchar* head = NULL;
gchar* oldhead = NULL;
gchar** buf;
gchar* header_list;
gchar* saveptr;

header_list = g_strdup(headers);
line = strtok_r(header_list, "\r\n", &saveptr);
if (line != NULL) {
do {
buf = g_strsplit(line, ":", MAX_TOKENS);
if (buf[1] != NULL) {
if (g_ascii_strcasecmp(buf[0], header) == 0) {
if (head) {
oldhead = head;
head = g_strconcat(head, ", ", buf[1], NULL);
g_free(oldhead);
}
else
head = g_strdup(buf[1]);
if (head)
g_strstrip(head);
}
}
g_strfreev(buf);
} while ((line = strtok_r(NULL, "\r\n", &saveptr)) != NULL);