00001 #ifndef PROTON_LISTENER_H 00002 #define PROTON_LISTENER_H 1 00003 00004 /* 00005 * Licensed to the Apache Software Foundation (ASF) under one 00006 * or more contributor license agreements. See the NOTICE file 00007 * distributed with this work for additional information 00008 * regarding copyright ownership. The ASF licenses this file 00009 * to you under the Apache License, Version 2.0 (the 00010 * "License"); you may not use this file except in compliance 00011 * with the License. You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, 00016 * software distributed under the License is distributed on an 00017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00018 * KIND, either express or implied. See the License for the 00019 * specific language governing permissions and limitations 00020 * under the License. 00021 */ 00022 00023 #include <proton/import_export.h> 00024 #include <proton/types.h> 00025 #include <proton/event.h> 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00050 PNP_EXTERN pn_listener_t *pn_listener(void); 00051 00056 PNP_EXTERN void pn_listener_free(pn_listener_t *l); 00057 00063 PNP_EXTERN void pn_listener_accept(pn_listener_t*, pn_connection_t *); 00064 00068 PNP_EXTERN pn_condition_t *pn_listener_condition(pn_listener_t *l); 00069 00074 PNP_EXTERN void *pn_listener_get_context(pn_listener_t *listener); 00075 00076 PNP_EXTERN void pn_listener_set_context(pn_listener_t *listener, void *context); 00077 00085 PNP_EXTERN pn_record_t *pn_listener_attachments(pn_listener_t *listener); 00086 00094 PNP_EXTERN void pn_listener_close(pn_listener_t *l); 00095 00099 PNP_EXTERN pn_proactor_t *pn_listener_proactor(pn_listener_t *c); 00100 00106 PNP_EXTERN pn_listener_t *pn_event_listener(pn_event_t *event); 00107 00112 #ifdef __cplusplus 00113 } 00114 #endif 00115 00116 #endif /* listener.h */