Qpid Proton C  0.40.0
types.h
Go to the documentation of this file.
1 #ifndef PROTON_TYPES_H
2 #define PROTON_TYPES_H 1
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include <proton/import_export.h>
26 #include <stddef.h>
27 #include <proton/type_compat.h>
28 
133 #ifdef __cplusplus
134 extern "C" {
135 #endif
136 
142 typedef uint32_t pn_sequence_t;
143 
149 typedef uint32_t pn_frame_count_t;
150 
156 typedef uint32_t pn_millis_t;
157 
163 #define PN_MILLIS_MAX (~0U)
164 
170 typedef uint32_t pn_seconds_t;
171 
177 typedef int64_t pn_timestamp_t;
178 
184 typedef uint32_t pn_char_t;
185 
191 typedef uint32_t pn_decimal32_t;
192 
198 typedef uint64_t pn_decimal64_t;
199 
205 typedef struct {
206  char bytes[16];
208 
214 typedef struct {
215  char bytes[16];
216 } pn_uuid_t;
217 
223 typedef struct pn_bytes_t {
224  size_t size;
225  const char *start;
226 } pn_bytes_t;
227 
233 PN_EXTERN inline pn_bytes_t pn_bytes(size_t size, const char *start)
234 {
235  pn_bytes_t bytes = {size, start};
236  return bytes;
237 }
238 
239 PN_EXTERN extern const pn_bytes_t pn_bytes_null;
240 
246 typedef struct pn_rwbytes_t {
247  size_t size;
248  char *start;
249 } pn_rwbytes_t;
250 
256 PN_EXTERN inline pn_rwbytes_t pn_rwbytes(size_t size, char *start)
257 {
258  pn_rwbytes_t bytes = {size, start};
259  return bytes;
260 }
261 
262 PN_EXTERN extern const pn_rwbytes_t pn_rwbytes_null;
263 
286 typedef int pn_state_t;
287 
301 
311 typedef struct pn_session_t pn_session_t;
312 
330 typedef struct pn_link_t pn_link_t;
331 
421 
433 
440 
451 
458 
465 
478 
482 typedef const void* pn_handle_t;
483 
487 typedef struct pn_class_t pn_class_t;
488 
492 typedef struct pn_record_t pn_record_t;
493 
501 typedef struct pn_handler_t pn_handler_t;
506 #ifdef __cplusplus
507 }
508 #endif
509 
510 #endif /* types.h */
struct pn_listener_t pn_listener_t
A listener for incoming connections.
Definition: types.h:439
uint32_t pn_decimal32_t
A 32-bit decimal floating-point number.
Definition: types.h:191
uint32_t pn_millis_t
A span of time in milliseconds.
Definition: types.h:156
pn_rwbytes_t pn_rwbytes(size_t size, char *start)
Create a pn_rwbytes_t.
Definition: types.h:256
struct pn_event_batch_t pn_event_batch_t
A batch of events that must be handled in sequence.
Definition: types.h:477
struct pn_class_t pn_class_t
A type representing the type of a proton internal object.
Definition: types.h:487
A 16-byte universally unique identifier.
Definition: types.h:214
const void * pn_handle_t
A type to represent the internal navigational state of a proton object.
Definition: types.h:482
struct pn_transport_t pn_transport_t
A network channel supporting an AMQP connection.
Definition: types.h:450
A non-const byte buffer.
Definition: types.h:246
struct pn_collector_t pn_collector_t
An event collector.
Definition: types.h:432
struct pn_session_t pn_session_t
An AMQP Session object.
Definition: types.h:311
pn_bytes_t pn_bytes(size_t size, const char *start)
Create a pn_bytes_t.
Definition: types.h:233
struct pn_proactor_t pn_proactor_t
A harness for multithreaded IO.
Definition: types.h:457
struct pn_delivery_t pn_delivery_t
An AMQP Delivery object.
Definition: types.h:420
A 128-bit decimal floating-point number.
Definition: types.h:205
uint64_t pn_decimal64_t
A 64-bit decimal floating-point number.
Definition: types.h:198
uint32_t pn_seconds_t
A span of time in seconds.
Definition: types.h:170
uint32_t pn_sequence_t
A sequence number.
Definition: types.h:142
uint32_t pn_char_t
A 32-bit Unicode code point.
Definition: types.h:184
struct pn_raw_connection_t pn_raw_connection_t
A raw network connection used with the proactor.
Definition: types.h:464
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:300
struct pn_record_t pn_record_t
A type representing attached context information.
Definition: types.h:492
int pn_state_t
Holds the state flags for an AMQP endpoint.
Definition: types.h:286
uint32_t pn_frame_count_t
A count or limit of AMQP transfer frames.
Definition: types.h:149
A const byte buffer.
Definition: types.h:223
int64_t pn_timestamp_t
A 64-bit timestamp in milliseconds since the Unix epoch.
Definition: types.h:177