Qpid Proton C API  0.18.0
listener.h
Go to the documentation of this file.
1 #ifndef PROTON_LISTENER_H
2 #define PROTON_LISTENER_H 1
3 
4 /*
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  */
22 
23 #include <proton/import_export.h>
24 #include <proton/types.h>
25 #include <proton/event.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
50 PNP_EXTERN pn_listener_t *pn_listener(void);
51 
56 PNP_EXTERN void pn_listener_free(pn_listener_t *l);
57 
64 
69 
74 PNP_EXTERN void *pn_listener_get_context(pn_listener_t *listener);
75 
76 PNP_EXTERN void pn_listener_set_context(pn_listener_t *listener, void *context);
77 
85 PNP_EXTERN pn_record_t *pn_listener_attachments(pn_listener_t *listener);
86 
94 PNP_EXTERN void pn_listener_close(pn_listener_t *l);
95 
100 
106 PNP_EXTERN pn_listener_t *pn_event_listener(pn_event_t *event);
107 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* listener.h */
struct pn_listener_t pn_listener_t
A listener for incoming connections.
Definition: types.h:420
AMQP and API data types.
PNP_EXTERN void pn_listener_accept(pn_listener_t *, pn_connection_t *)
Bind connection to a new transport accepted from listener.
PNP_EXTERN pn_proactor_t * pn_listener_proactor(pn_listener_t *c)
The proactor associated with a listener.
PNP_EXTERN pn_record_t * pn_listener_attachments(pn_listener_t *listener)
Get the attachments that are associated with a listener object.
struct pn_proactor_t pn_proactor_t
A harness for multithreaded IO.
Definition: types.h:438
PNP_EXTERN pn_condition_t * pn_listener_condition(pn_listener_t *l)
Get the error condition for a listener.
PNP_EXTERN void pn_listener_free(pn_listener_t *l)
Free a listener.
PNP_EXTERN void pn_listener_close(pn_listener_t *l)
Close the listener.
Protocol and transport events.
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:281
PNP_EXTERN pn_listener_t * pn_listener(void)
Create a listener to pass to pn_proactor_listen()
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
struct pn_event_t pn_event_t
Notification of a state change in the protocol engine.
Definition: event.h:75
PNP_EXTERN pn_listener_t * pn_event_listener(pn_event_t *event)
Return the listener associated with an event.