summaryrefslogtreecommitdiff
path: root/xdelta1/libedsio/edsio.ser
blob: ada3b116096086417a2781aab64d4245efb6aeb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
;; -*- Emacs-Lisp -*-

(defmodule edsio 6 "edsio.h" nil)

(defsertype EdsioUint 1
  ((val uint))
  ()
  )

(defsertype EdsioBytes 2
  ((val bytes))
  ()
  )

(defsertype EdsioString 3
  ((val string))
  ()
  )

(defsertype GenericTime 4
  ((seconds uint)
   (nanos   uint)
   )
  ()
  )

(defetype source "SerialSource*")
(defetype sink   "SerialSink*")
(defetype int     "int")
(defetype string  "const char*")

(defevent GetTimeOfDayFailure      Error () (errno)
  "Gettimeofday failed: ${STRERROR}")

(defevent TimeFailure      Error () (errno)
  "Time failed: ${STRERROR}")

(defevent UnregisteredType Error ((library int) (number int)) ()
  "Unregistered serial type: library=${LIBRARY} number=${NUMBER}")

(defevent UnexpectedLibraryType Error ((expected int) (received int)) ()
  "Unexpected serial library type: expected ${EXPECTED}, received ${RECEIVED}")

(defevent UnexpectedType Error () ()
  "Unexpected serial type")

(defevent OutputBufferShort Error () ()
  "Output buffer is too short")

(defevent InvalidBase64Encoding Error () ()
  "Invalid base64 encoding")

(defevent MissingChecksum Error () ()
  "Missing embedded checksum in base64 encoding")

(defevent InvalidChecksum Error () ()
  "Checksum verification failed")

(defevent SourceEof Error ((source source)) ()
  "${SOURCE}: Unexpected EOF")

(defevent IncorrectAllocation Error ((source source)) ()
  "${SOURCE}: Incorrect allocation")

(defevent InvalidIntegerString Error ((msg string) (arg string)) ()
  "${MSG}: not an integer: ${ARG}")

(defevent IntegerOutOfRange Error ((msg string) (arg string)) ()
  "${MSG}: integer out of range: ${ARG}")

(defevent InvalidIntegerSign Error ((msg string) (arg string)) ()
  "${MSG}: expected an unsigned integer: ${ARG}")

(defevent DuplicatePropertyTypeRegistered Error ((name string)) ()
  "Property type registered twice: ${NAME}")

(defevent DuplicateHostTypeRegistered Error ((name string)) ()
  "Property host registered twice: ${NAME}")

(defevent DuplicatePropertyNameRegistered Warning ((name string)) ()
  "Property name registered twice (ignored): ${NAME}")

(defevent NoSuchProperty Error ((num int)) ()
  "Unregistered property: ${NUM}")

(defevent NoSuchPropertyType Error ((name string)) ()
  "Unregistered property type: ${NAME}")

(defevent NoSuchHostType Error ((name string)) ()
  "Unregistered host type: ${NAME}")

(defevent WrongHostType Error ((name string) (recv string) (expect string)) ()
  "Wrong property host type: received ${RECV}, expected ${EXPECT}")

(defevent WrongDataType Error ((name string) (recv string) (expect string)) ()
  "Wrong property data type: received ${RECV}, expected ${EXPECT}")

(defevent PropertyNotSet Error ((name string)) ()
  "${NAME} property not set")

(defevent PersistenceUnavailable Error ((name string) (host string)) ()
  "Persistence is unavailable in host ${HOST} for property ${NAME}")

(defevent InvalidStreamChecksum Error () ()
  "Incorrect stream checksum")

(defevent InvalidHexDigit Error ((bad string) (ctx string)) ()
  "Invalid hex digit ${BAD} in context: ${CTX}")

(defevent MD5StringShort Error ((short string)) ()
  "MD5 string too short: ${SHORT}")

(defevent MD5StringLong Error ((long string)) ()
  "MD5 string too long: ${LONG}")

(defevent UnregisteredLibrary Error ((number int)) ()
  "Unregistered library: ${NUMBER}")

(defevent GModuleError Error ((file string) (msg string)) ()
  "GModule: ${FILE}: ${MSG}")

;; properties

(defprophost PropTest "P" "PropTest*" t)

(defprophosttype PropTest uint)
(defprophosttype PropTest bytes)
(defprophosttype PropTest string)
(defprophosttype PropTest EdsioUint)