summaryrefslogtreecommitdiffabout
path: root/libical/src/libicalss/icalcstpclient.h
Unidiff
Diffstat (limited to 'libical/src/libicalss/icalcstpclient.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libicalss/icalcstpclient.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/libical/src/libicalss/icalcstpclient.h b/libical/src/libicalss/icalcstpclient.h
new file mode 100644
index 0000000..8d9d0c9
--- a/dev/null
+++ b/libical/src/libicalss/icalcstpclient.h
@@ -0,0 +1,100 @@
1/* -*- Mode: C -*- */
2/*======================================================================
3 FILE: icalcstpclient.h
4 CREATOR: eric 4 Feb 01
5
6 $Id$
7
8
9 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of either:
13
14 The LGPL as published by the Free Software Foundation, version
15 2.1, available at: http://www.fsf.org/copyleft/lesser.html
16
17 Or:
18
19 The Mozilla Public License Version 1.0. You may obtain a copy of
20 the License at http://www.mozilla.org/MPL/
21
22 The original code is icalcstp.h
23
24======================================================================*/
25
26
27#ifndef ICALCSTPC_H
28#define ICALCSTPC_H
29
30#include "ical.h"
31#include "icalcstp.h"
32
33/********************** Client (Sender) Interfaces **************************/
34
35/* How to use:
36
37 1) Construct a new icalcstpc
38 2) Issue a command by calling one of the command routines.
39 3) Repeat until both call icalcstpc_next_output and
40 icalcstpc_next_input return 0:
41 3a) Call icalcstpc_next_output. Send string to server.
42 3b) Get string from server, & give to icalcstp_next_input()
43 4) Iterate with icalcstpc_first_response & icalcstp_next_response to
44 get the servers responses
45 5) Repeat at #2
46*/
47
48
49typedef void icalcstpc;
50
51/* Response code sent by the server. */
52 typedef struct icalcstpc_response {
53 icalrequeststatus code;
54 char *arg; /* These strings are owned by libical */
55 char *debug_text;
56 char *more_text;
57 void* result;
58} icalcstpc_response;
59
60
61icalcstpc* icalcstpc_new();
62
63void icalcstpc_free(icalcstpc* cstpc);
64
65int icalcstpc_set_timeout(icalcstpc* cstp, int sec);
66
67
68/* Get the next string to send to the server */
69char* icalcstpc_next_output(icalcstpc* cstp, char* line);
70
71/* process the next string from the server */
72int icalcstpc_next_input(icalcstpc* cstp, char * line);
73
74/* After icalcstpc_next_input returns a 0, there are responses
75 ready. use these to get them */
76icalcstpc_response icalcstpc_first_response(icalcstpc* cstp);
77icalcstpc_response icalcstpc_next_response(icalcstpc* cstp);
78
79/* Issue a command */
80icalerrorenum icalcstpc_abort(icalcstpc* cstp);
81icalerrorenum icalcstpc_authenticate(icalcstpc* cstp, char* mechanism,
82 char* init_data, char* f(char*) );
83icalerrorenum icalcstpc_capability(icalcstpc* cstp);
84icalerrorenum icalcstpc_calidexpand(icalcstpc* cstp,char* calid);
85icalerrorenum icalcstpc_continue(icalcstpc* cstp, unsigned int time);
86icalerrorenum icalcstpc_disconnect(icalcstpc* cstp);
87icalerrorenum icalcstpc_identify(icalcstpc* cstp, char* id);
88icalerrorenum icalcstpc_starttls(icalcstpc* cstp, char* command,
89 char* init_data, char* f(char*));
90icalerrorenum icalcstpc_senddata(icalcstpc* cstp, unsigned int time,
91 icalcomponent *comp);
92icalerrorenum icalcstpc_upnexpand(icalcstpc* cstp,char* calid);
93icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time,
94 icalcomponent *comp);
95
96
97#endif /* !ICALCSTPC_H */
98
99
100