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 <sys/types.h> 00027 #ifndef __cplusplus 00028 #include <stdint.h> 00029 #else 00030 #include <proton/type_compat.h> 00031 #endif 00032 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 typedef int32_t pn_sequence_t; 00039 typedef uint32_t pn_millis_t; 00040 typedef uint32_t pn_seconds_t; 00041 typedef int64_t pn_timestamp_t; 00042 typedef uint32_t pn_char_t; 00043 typedef uint32_t pn_decimal32_t; 00044 typedef uint64_t pn_decimal64_t; 00045 typedef struct { 00046 char bytes[16]; 00047 } pn_decimal128_t; 00048 typedef struct { 00049 char bytes[16]; 00050 } pn_uuid_t; 00051 00052 typedef struct { 00053 size_t size; 00054 char *start; 00055 } pn_bytes_t; 00056 00057 PN_EXTERN pn_bytes_t pn_bytes(size_t size, char *start); 00058 PN_EXTERN pn_bytes_t pn_bytes_dup(size_t size, const char *start); 00059 00060 #ifdef __cplusplus 00061 } 00062 #endif 00063 00064 #endif /* types.h */