/[webpac]/trunk/openisis/tcl/openisistcl.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/openisis/tcl/openisistcl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 239 - (show annotations)
Mon Mar 8 17:49:13 2004 UTC (20 years ago) by dpavlin
File MIME type: text/plain
File size: 2714 byte(s)
including openisis 0.9.0 into webpac tree

1 /*
2 openisis - an open implementation of the CDS/ISIS database
3 Version 0.8.x (patchlevel see file Version)
4 Copyright (C) 2001-2003 by Erik Grziwotz, erik@openisis.org
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 see README for more information
21 EOH */
22
23 /*
24 $Id: openisistcl.h,v 1.12 2003/06/06 12:38:39 mawag Exp $
25 tcl/tk binding
26 */
27
28 #ifndef OPENISISTCL
29 #define OPENISISTCL
30
31 #include <tcl.h>
32
33 EXTERN int openIsisTclInit _ANSI_ARGS_ ( ( Tcl_Interp *interp ) );
34
35 /** @return session id on success, -1 on error
36 */
37 EXTERN int openIsisTclNewSession _ANSI_ARGS_ ( ( Tcl_Interp *ip ) );
38
39 /** @return boolean ok
40 */
41 EXTERN int openIsisTclGetSession _ANSI_ARGS_ ( (int sessid, Tcl_Interp **ip ) );
42
43 /*
44 interface needed by "main-threaded" server:
45 - create commands for records "req", "res", "ses"
46 - bind Recs to those commands and set "the" session.
47 all recs are dynamic and can be assumed to belong to "the" session.
48 should be discarded by "the" session when extended.
49 the "req" record must not be modified
50 (since it's real owner session might be working in parallel).
51 modification would require "copy-on-write".
52 - retrieve Recs
53 future extension:
54 the same game with multiple openIsisTclSessions,
55 each with one interp (constant)
56 */
57 /**
58 create record command slot
59 on a clean session, ids are guaranteed to increment 0,1 ...
60 @param fdt optional name of fdt rec cmd
61 return slot id >=0 or err <0
62 */
63 EXTERN int openIsisTclCreateRecCmd (
64 int sid, const char *nam, const char *fdt, int flg );
65 /**
66 set/get cnt records to/from slots specified by ids
67 return cnt or err <0
68 EXTERN int openIsisTclSetRecs ( int oitses, int cnt,
69 const int *ids, OpenIsisRec **recs );
70 EXTERN int openIsisTclGetRecs ( int oitses, int cnt,
71 const int *ids, OpenIsisRec **recs );
72 */
73 /**
74 set session to ses and eval command in oitses' interp
75 if recs is not 0, set cnt recs as specified by ids
76 (as created by openIsisTclCreateRecCmd)
77 */
78 EXTERN int openIsisTclEval ( int sid,
79 int cnt, const int *ids, OpenIsisRec **recs, char *script );
80
81
82 #endif /* OPENISISTCL */

  ViewVC Help
Powered by ViewVC 1.1.26