C AMQP Protocol Engine API  0.7
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
messenger.h
Go to the documentation of this file.
1 #ifndef PROTON_MESSENGER_H
2 #define PROTON_MESSENGER_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/message.h>
27 #include <proton/selectable.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
132 
141 
146 typedef int64_t pn_tracker_t;
147 
152 typedef enum {
163 } pn_status_t;
164 
174 PN_EXTERN pn_messenger_t *pn_messenger(const char *name);
175 
182 PN_EXTERN const char *pn_messenger_name(pn_messenger_t *messenger);
183 
193 PN_EXTERN int pn_messenger_set_certificate(pn_messenger_t *messenger, const char *certificate);
194 
203 
212 PN_EXTERN int pn_messenger_set_private_key(pn_messenger_t *messenger, const char *private_key);
213 
221 
230 PN_EXTERN int pn_messenger_set_password(pn_messenger_t *messenger, const char *password);
231 
238 PN_EXTERN const char *pn_messenger_get_password(pn_messenger_t *messenger);
239 
251 PN_EXTERN int pn_messenger_set_trusted_certificates(pn_messenger_t *messenger, const char *cert_db);
252 
260 
273 PN_EXTERN int pn_messenger_set_timeout(pn_messenger_t *messenger, int timeout);
274 
284 
292 
301 PN_EXTERN int pn_messenger_set_blocking(pn_messenger_t *messenger, bool blocking);
302 
316 
327 PN_EXTERN int pn_messenger_set_passive(pn_messenger_t *messenger, bool passive);
328 
335 
350 
363 
380 
391 PN_EXTERN int pn_messenger_set_outgoing_window(pn_messenger_t *messenger, int window);
392 
412 
424  int window);
425 
435 
451 
460 
468 PN_EXTERN pn_subscription_t *pn_messenger_subscribe(pn_messenger_t *messenger, const char *source);
469 
479 
487 
495 
507 
519 PN_EXTERN pn_status_t pn_messenger_status(pn_messenger_t *messenger, pn_tracker_t tracker);
520 
533 PN_EXTERN bool pn_messenger_buffered(pn_messenger_t *messenger, pn_tracker_t tracker);
534 
547 PN_EXTERN int pn_messenger_settle(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
548 
563 
574 PN_EXTERN int pn_messenger_work(pn_messenger_t *messenger, int timeout);
575 
588 
621 PN_EXTERN int pn_messenger_send(pn_messenger_t *messenger, int n);
622 
647 PN_EXTERN int pn_messenger_recv(pn_messenger_t *messenger, int limit);
648 
660 
675 PN_EXTERN int pn_messenger_get(pn_messenger_t *messenger, pn_message_t *message);
676 
691 
702 
706 #define PN_CUMULATIVE (0x1)
707 
729 PN_EXTERN int pn_messenger_accept(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
730 
752 PN_EXTERN int pn_messenger_reject(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
753 
762 
770 
833 PN_EXTERN int pn_messenger_route(pn_messenger_t *messenger, const char *pattern,
834  const char *address);
835 
858 PN_EXTERN int pn_messenger_rewrite(pn_messenger_t *messenger, const char *pattern,
859  const char *address);
860 
890 
898 
903 #ifdef __cplusplus
904 }
905 #endif
906 
907 #endif /* messenger.h */