00001 #ifndef PROTON_TYPES_H 00002 #define PROTON_TYPES_H 1 00003 00004 /* 00005 * 00006 * Licensed to the Apache Software Foundation (ASF) under one 00007 * or more contributor license agreements. See the NOTICE file 00008 * distributed with this work for additional information 00009 * regarding copyright ownership. The ASF licenses this file 00010 * to you under the Apache License, Version 2.0 (the 00011 * "License"); you may not use this file except in compliance 00012 * with the License. You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, 00017 * software distributed under the License is distributed on an 00018 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00019 * KIND, either express or implied. See the License for the 00020 * specific language governing permissions and limitations 00021 * under the License. 00022 * 00023 */ 00024 00025 #include <proton/import_export.h> 00026 #include <stddef.h> 00027 #include <proton/type_compat.h> 00028 00129 #ifdef __cplusplus 00130 extern "C" { 00131 #endif 00132 00138 typedef uint32_t pn_sequence_t; 00139 00145 typedef uint32_t pn_millis_t; 00146 00152 #define PN_MILLIS_MAX (~0U) 00153 00159 typedef uint32_t pn_seconds_t; 00160 00166 typedef int64_t pn_timestamp_t; 00167 00173 typedef uint32_t pn_char_t; 00174 00180 typedef uint32_t pn_decimal32_t; 00181 00187 typedef uint64_t pn_decimal64_t; 00188 00194 typedef struct { 00195 char bytes[16]; 00196 } pn_decimal128_t; 00197 00203 typedef struct { 00204 char bytes[16]; 00205 } pn_uuid_t; 00206 00212 typedef struct pn_bytes_t { 00213 size_t size; 00214 const char *start; 00215 } pn_bytes_t; 00216 00222 PN_EXTERN pn_bytes_t pn_bytes(size_t size, const char *start); 00223 00224 static const pn_bytes_t pn_bytes_null = { 0, NULL }; 00225 00231 typedef struct pn_rwbytes_t { 00232 size_t size; 00233 char *start; 00234 } pn_rwbytes_t; 00235 00241 PN_EXTERN pn_rwbytes_t pn_rwbytes(size_t size, char *start); 00242 00243 static const pn_rwbytes_t pn_rwbytes_null = { 0, NULL }; 00244 00267 typedef int pn_state_t; 00268 00281 typedef struct pn_connection_t pn_connection_t; 00282 00292 typedef struct pn_session_t pn_session_t; 00293 00311 typedef struct pn_link_t pn_link_t; 00312 00401 typedef struct pn_delivery_t pn_delivery_t; 00402 00413 typedef struct pn_collector_t pn_collector_t; 00414 00420 typedef struct pn_listener_t pn_listener_t; 00421 00431 typedef struct pn_transport_t pn_transport_t; 00432 00438 typedef struct pn_proactor_t pn_proactor_t; 00439 00447 typedef struct pn_handler_t pn_handler_t; 00452 #ifdef __cplusplus 00453 } 00454 #endif 00455 00456 #endif /* types.h */