From 5830e9e5d4095088de0269190673a4a88919ebd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Mon, 7 Jul 2008 08:35:12 +0000 Subject: [PATCH] example code --- org.glite.lb.doc/Makefile | 7 ++++++- org.glite.lb.doc/src/LBDG-Common.tex | 2 ++ org.glite.lb.doc/src/LBDG-Introduction.tex | 2 ++ org.glite.lb.doc/src/LBDG.tex | 5 ++++- org.glite.lb.doc/src/consumer_api.tex | 6 +++++- org.glite.lb.doc/src/notification_api.tex | 2 ++ org.glite.lb.doc/src/producer_api.tex | 2 ++ org.glite.lb.doc/src/web_services.tex | 2 ++ 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.doc/Makefile b/org.glite.lb.doc/Makefile index 1562368..23154ea 100644 --- a/org.glite.lb.doc/Makefile +++ b/org.glite.lb.doc/Makefile @@ -11,7 +11,7 @@ PREFIX=/opt/glite VPATH = ${top_srcdir}/src # example source code is part of the org.glite.lb.client -EXAMPLE_SOURCE_DIR=${stagedir}/share/doc/glite-lb-client-3.1.2/examples +EXAMPLE_SOURCE_DIR=${top_srcdir}/examples KPATH = TEXINPUTS=".:$(EXAMPLE_SOURCE_DIR):$(VPATH)//:" KPATHBIB = BIBINPUTS=".:$(VPATH)//:" @@ -53,6 +53,11 @@ install: $(INSTALL) -m 644 LBUG.pdf ${PREFIX}/share/doc/${package}-${version} $(INSTALL) -m 644 LBAG.pdf ${PREFIX}/share/doc/${package}-${version} $(INSTALL) -m 644 LBDG.pdf ${PREFIX}/share/doc/${package}-${version} + -mkdir -p ${PREFIX}/share/examples/dg +# michal: install DG example sources + for p in ${top_srcdir}/examples/*; do \ + ${INSTALL} -m 644 "$$p" "${PREFIX}/share/examples/dg"; \ + done clean: rm -rvf LBUG* LBAG* LBDG* events.tex status.tex diff --git a/org.glite.lb.doc/src/LBDG-Common.tex b/org.glite.lb.doc/src/LBDG-Common.tex index 35272a9..629b563 100644 --- a/org.glite.lb.doc/src/LBDG-Common.tex +++ b/org.glite.lb.doc/src/LBDG-Common.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{\LB\ Common} \TODO{Add the information about LB common - list of header files, important functions and data types and their description, etc.} diff --git a/org.glite.lb.doc/src/LBDG-Introduction.tex b/org.glite.lb.doc/src/LBDG-Introduction.tex index 8b88ce3..6e67c49 100644 --- a/org.glite.lb.doc/src/LBDG-Introduction.tex +++ b/org.glite.lb.doc/src/LBDG-Introduction.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{Introduction} \TODO{Add the information from the "Best practices" workshop, i.e. information how the whole LB is coded, why C, what were the general techniques - context, connection pool, .T templates description, etc.} diff --git a/org.glite.lb.doc/src/LBDG.tex b/org.glite.lb.doc/src/LBDG.tex index 90c8a0f..5692c19 100644 --- a/org.glite.lb.doc/src/LBDG.tex +++ b/org.glite.lb.doc/src/LBDG.tex @@ -1,3 +1,4 @@ +% -*- mode: latex -*- \documentclass{egee} \input{definitions} @@ -16,8 +17,10 @@ (\LB) service API. Logging (producer), querying (consumer) and notification API as well as the Web Services Interface is described in details together with programing examples. } -\begin{document} +\usepackage{listings} +\begin{document} +\lstset{language=C,basicstyle=\footnotesize,numbers=left,breaklines=true} % ----- BEGIN COPY ----- % copied from org.glite.lb.client/doc/api/api.tex in hope it could be useful diff --git a/org.glite.lb.doc/src/consumer_api.tex b/org.glite.lb.doc/src/consumer_api.tex index b00a663..4085e9b 100644 --- a/org.glite.lb.doc/src/consumer_api.tex +++ b/org.glite.lb.doc/src/consumer_api.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{\LB\ Querying (Consumer) API} \TODO{Complete review; create really functional (buildable) examples and use verbatiminput of relevant part of the code; add list of header files, important functions and data types and their description, etc.} @@ -92,7 +94,9 @@ all the relevant structures and API calls to retrieve status information about a job with the ID\\ \texttt{https://lhun.ics.muni.cz:9000/OirOgeWh\_F9sfMZjnIPYhQ}. -\verbatiminput{example1_code.c} +\lstinputlisting{example1_code.c} + +%\verbatiminput{example1_code.c} %\begin{verbatim} % #include diff --git a/org.glite.lb.doc/src/notification_api.tex b/org.glite.lb.doc/src/notification_api.tex index d95f60f..53bca84 100644 --- a/org.glite.lb.doc/src/notification_api.tex +++ b/org.glite.lb.doc/src/notification_api.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{\LB\ Notification API} The purpose of this section is demonstrating the usage of the \LB\ notification API. Two examples of basic API usage are given. diff --git a/org.glite.lb.doc/src/producer_api.tex b/org.glite.lb.doc/src/producer_api.tex index 6e21829..cbb8b36 100644 --- a/org.glite.lb.doc/src/producer_api.tex +++ b/org.glite.lb.doc/src/producer_api.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{\LB\ Logging (Producer) API} \TODO{Add the list of header files, important functions and data types and their description; add fully working (buildable) programing examples and use verbatiminput to include the important parts of the code.} diff --git a/org.glite.lb.doc/src/web_services.tex b/org.glite.lb.doc/src/web_services.tex index b322e96..a96ccae 100644 --- a/org.glite.lb.doc/src/web_services.tex +++ b/org.glite.lb.doc/src/web_services.tex @@ -1,3 +1,5 @@ +% -*- mode: latex -*- + \section{Using \LB\ Web Service} \TODO{Complete review, list of all relevant (WSDL) files, their location, etc.} -- 1.8.2.3