proton/connection.h

Go to the documentation of this file.
00001 #ifndef PROTON_CONNECTION_H
00002 #define PROTON_CONNECTION_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 <proton/codec.h>
00027 #include <proton/condition.h>
00028 #include <proton/error.h>
00029 #include <proton/type_compat.h>
00030 #include <proton/types.h>
00031 
00032 #include <stddef.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00050 #define PN_LOCAL_UNINIT (1)
00051 
00055 #define PN_LOCAL_ACTIVE (2)
00056 
00060 #define PN_LOCAL_CLOSED (4)
00061 
00065 #define PN_REMOTE_UNINIT (8)
00066 
00070 #define PN_REMOTE_ACTIVE (16)
00071 
00075 #define PN_REMOTE_CLOSED (32)
00076 
00081 #define PN_LOCAL_MASK (PN_LOCAL_UNINIT | PN_LOCAL_ACTIVE | PN_LOCAL_CLOSED)
00082 
00087 #define PN_REMOTE_MASK (PN_REMOTE_UNINIT | PN_REMOTE_ACTIVE | PN_REMOTE_CLOSED)
00088 
00089 PN_EXTERN pn_connection_t *pn_connection(void);
00090 
00096 PN_EXTERN pn_connection_t *pn_connection(void);
00097 
00107 PN_EXTERN void pn_connection_free(pn_connection_t *connection);
00108 
00118 PN_EXTERN void pn_connection_release(pn_connection_t *connection);
00119 
00136 PN_EXTERN pn_error_t *pn_connection_error(pn_connection_t *connection);
00137 
00156 PN_EXTERN void pn_connection_collect(pn_connection_t *connection, pn_collector_t *collector);
00157 
00162 PN_EXTERN pn_collector_t* pn_connection_collector(pn_connection_t *connection);
00163 
00176 PN_EXTERN void *pn_connection_get_context(pn_connection_t *connection);
00177 
00189 PN_EXTERN void pn_connection_set_context(pn_connection_t *connection, void *context);
00190 
00197 PN_EXTERN pn_record_t *pn_connection_attachments(pn_connection_t *connection);
00198 
00205 PN_EXTERN pn_state_t pn_connection_state(pn_connection_t *connection);
00206 
00215 PN_EXTERN void pn_connection_open(pn_connection_t *connection);
00216 
00227 PN_EXTERN void pn_connection_close(pn_connection_t *connection);
00228 
00237 PN_EXTERN void pn_connection_reset(pn_connection_t *connection);
00238 
00255 PN_EXTERN pn_condition_t *pn_connection_condition(pn_connection_t *connection);
00256 
00271 PN_EXTERN pn_condition_t *pn_connection_remote_condition(pn_connection_t *connection);
00272 
00283 PN_EXTERN const char *pn_connection_get_container(pn_connection_t *connection);
00284 
00291 PN_EXTERN void pn_connection_set_container(pn_connection_t *connection, const char *container);
00292 
00307 PN_EXTERN void pn_connection_set_user(pn_connection_t *connection, const char *user);
00308 
00322 PN_EXTERN void pn_connection_set_password(pn_connection_t *connection, const char *password);
00323 
00330 PN_EXTERN const char *pn_connection_get_user(pn_connection_t *connection);
00331 
00342 PN_EXTERN const char *pn_connection_get_hostname(pn_connection_t *connection);
00343 
00357 PN_EXTERN void pn_connection_set_hostname(pn_connection_t *connection, const char *hostname);
00358 
00373 PN_EXTERN const char *pn_connection_remote_container(pn_connection_t *connection);
00374 
00388 PN_EXTERN const char *pn_connection_remote_hostname(pn_connection_t *connection);
00389 
00406 PN_EXTERN pn_data_t *pn_connection_offered_capabilities(pn_connection_t *connection);
00407 
00424 PN_EXTERN pn_data_t *pn_connection_desired_capabilities(pn_connection_t *connection);
00425 
00441 PN_EXTERN pn_data_t *pn_connection_properties(pn_connection_t *connection);
00442 
00455 PN_EXTERN pn_data_t *pn_connection_remote_offered_capabilities(pn_connection_t *connection);
00456 
00469 PN_EXTERN pn_data_t *pn_connection_remote_desired_capabilities(pn_connection_t *connection);
00470 
00483 PN_EXTERN pn_data_t *pn_connection_remote_properties(pn_connection_t *connection);
00484 
00494 PN_EXTERN pn_transport_t *pn_connection_transport(pn_connection_t *connection);
00495 
00500 #ifdef __cplusplus
00501 }
00502 #endif
00503 
00504 #endif /* connection.h */

Generated on 29 Mar 2018 for Qpid Proton C by  doxygen 1.6.1