Qpid Proton C API  0.17.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
connection.h
Go to the documentation of this file.
1 #ifndef PROTON_CONNECTION_H
2 #define PROTON_CONNECTION_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 <proton/codec.h>
27 #include <proton/condition.h>
28 #include <proton/error.h>
29 #include <proton/type_compat.h>
30 #include <proton/types.h>
31 
32 #include <stddef.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
50 #define PN_LOCAL_UNINIT (1)
51 
56 #define PN_LOCAL_ACTIVE (2)
57 
61 #define PN_LOCAL_CLOSED (4)
62 
66 #define PN_REMOTE_UNINIT (8)
67 
71 #define PN_REMOTE_ACTIVE (16)
72 
76 #define PN_REMOTE_CLOSED (32)
77 
82 #define PN_LOCAL_MASK (PN_LOCAL_UNINIT | PN_LOCAL_ACTIVE | PN_LOCAL_CLOSED)
83 
88 #define PN_REMOTE_MASK (PN_REMOTE_UNINIT | PN_REMOTE_ACTIVE | PN_REMOTE_CLOSED)
89 
90 PN_EXTERN pn_connection_t *pn_connection(void);
91 
97 PN_EXTERN pn_connection_t *pn_connection(void);
98 
108 PN_EXTERN void pn_connection_free(pn_connection_t *connection);
109 
119 PN_EXTERN void pn_connection_release(pn_connection_t *connection);
120 
137 PN_EXTERN pn_error_t *pn_connection_error(pn_connection_t *connection);
138 
157 PN_EXTERN void pn_connection_collect(pn_connection_t *connection, pn_collector_t *collector);
158 
164 
177 PN_EXTERN void *pn_connection_get_context(pn_connection_t *connection);
178 
190 PN_EXTERN void pn_connection_set_context(pn_connection_t *connection, void *context);
191 
198 PN_EXTERN pn_record_t *pn_connection_attachments(pn_connection_t *connection);
199 
206 PN_EXTERN pn_state_t pn_connection_state(pn_connection_t *connection);
207 
216 PN_EXTERN void pn_connection_open(pn_connection_t *connection);
217 
228 PN_EXTERN void pn_connection_close(pn_connection_t *connection);
229 
238 PN_EXTERN void pn_connection_reset(pn_connection_t *connection);
239 
257 
273 
284 PN_EXTERN const char *pn_connection_get_container(pn_connection_t *connection);
285 
292 PN_EXTERN void pn_connection_set_container(pn_connection_t *connection, const char *container);
293 
308 PN_EXTERN void pn_connection_set_user(pn_connection_t *connection, const char *user);
309 
323 PN_EXTERN void pn_connection_set_password(pn_connection_t *connection, const char *password);
324 
331 PN_EXTERN const char *pn_connection_get_user(pn_connection_t *connection);
332 
343 PN_EXTERN const char *pn_connection_get_hostname(pn_connection_t *connection);
344 
358 PN_EXTERN void pn_connection_set_hostname(pn_connection_t *connection, const char *hostname);
359 
374 PN_EXTERN const char *pn_connection_remote_container(pn_connection_t *connection);
375 
389 PN_EXTERN const char *pn_connection_remote_hostname(pn_connection_t *connection);
390 
408 
426 
442 PN_EXTERN pn_data_t *pn_connection_properties(pn_connection_t *connection);
443 
457 
471 
485 
496 
501 #ifdef __cplusplus
502 }
503 #endif
504 
505 #endif /* connection.h */