Diffstat (limited to 'libical/src/libicalss/icalcstp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libicalss/icalcstp.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/libical/src/libicalss/icalcstp.h b/libical/src/libicalss/icalcstp.h new file mode 100644 index 0000000..dfc3618 --- a/dev/null +++ b/libical/src/libicalss/icalcstp.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* -*- Mode: C -*- */ | ||
2 | /*====================================================================== | ||
3 | FILE: icalcstp.h | ||
4 | CREATOR: eric 20 April 1999 | ||
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 ICALCSTP_H | ||
28 | #define ICALCSTP_H | ||
29 | |||
30 | #include "ical.h" | ||
31 | |||
32 | |||
33 | /* Connection state, from the state machine in RFC2445 */ | ||
34 | enum cstps_state { | ||
35 | NO_STATE, | ||
36 | CONNECTED, | ||
37 | AUTHENTICATED, | ||
38 | IDENTIFIED, | ||
39 | DISCONNECTED, | ||
40 | RECEIVE | ||
41 | }; | ||
42 | |||
43 | /* CSTP Commands that a client can issue to a server */ | ||
44 | typedef enum icalcstp_command { | ||
45 | ICAL_ABORT_COMMAND, | ||
46 | ICAL_AUTHENTICATE_COMMAND, | ||
47 | ICAL_CAPABILITY_COMMAND, | ||
48 | ICAL_CONTINUE_COMMAND, | ||
49 | ICAL_CALIDEXPAND_COMMAND, | ||
50 | ICAL_IDENTIFY_COMMAND, | ||
51 | ICAL_DISCONNECT_COMMAND, | ||
52 | ICAL_SENDDATA_COMMAND, | ||
53 | ICAL_STARTTLS_COMMAND, | ||
54 | ICAL_UPNEXPAND_COMMAND, | ||
55 | ICAL_COMPLETE_COMMAND, | ||
56 | ICAL_UNKNOWN_COMMAND | ||
57 | } icalcstp_command; | ||
58 | |||
59 | |||
60 | |||
61 | /* A statement is a combination of command or response code and a | ||
62 | component that the server and client exchage with each other. */ | ||
63 | struct icalcstp_statement { | ||
64 | icalcstp_command command; | ||
65 | char* str_data; /* If non-NUll use as arguments to command */ | ||
66 | int int_data; /* If non-NULL use as arguments to command */ | ||
67 | |||
68 | icalrequeststatus code; | ||
69 | |||
70 | icalcomponent* data; | ||
71 | }; | ||
72 | |||
73 | const char* icalcstp_command_to_string(icalcstp_command command); | ||
74 | icalcstp_command icalcstp_string_to_command(const char* str); | ||
75 | |||
76 | #endif /* !ICALCSTP_H */ | ||
77 | |||
78 | |||
79 | |||