C AMQP Protocol Engine API  0.6
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros 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 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
39 typedef int64_t pn_tracker_t;
40 
41 typedef enum {
50 } pn_status_t;
51 
59 PN_EXTERN pn_messenger_t *pn_messenger(const char *name);
60 
67 PN_EXTERN const char *pn_messenger_name(pn_messenger_t *messenger);
68 
79 PN_EXTERN int pn_messenger_set_certificate(pn_messenger_t *messenger, const char *certificate);
80 
89 
98 PN_EXTERN int pn_messenger_set_private_key(pn_messenger_t *messenger, const char *private_key);
99 
106 
114 PN_EXTERN int pn_messenger_set_password(pn_messenger_t *messenger, const char *password);
115 
121 PN_EXTERN const char *pn_messenger_get_password(pn_messenger_t *messenger);
122 
132 PN_EXTERN int pn_messenger_set_trusted_certificates(pn_messenger_t *messenger, const char *cert_db);
133 
140 
151 PN_EXTERN int pn_messenger_set_timeout(pn_messenger_t *messenger, int timeout);
152 
160 
168 
176 PN_EXTERN int pn_messenger_set_blocking(pn_messenger_t *messenger, bool blocking);
177 
184 
196 
207 
217 
230 PN_EXTERN int pn_messenger_set_outgoing_window(pn_messenger_t *messenger, int window);
231 
241 
259 PN_EXTERN int pn_messenger_set_incoming_window(pn_messenger_t *messenger, int window);
260 
271 
284 
292 
300 PN_EXTERN pn_subscription_t *pn_messenger_subscribe(pn_messenger_t *messenger, const char *source);
301 
303 
305 
307 
319 
329 PN_EXTERN pn_status_t pn_messenger_status(pn_messenger_t *messenger, pn_tracker_t tracker);
330 
339 PN_EXTERN bool pn_messenger_buffered(pn_messenger_t *messenger, pn_tracker_t tracker);
340 
352 PN_EXTERN int pn_messenger_settle(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
353 
365 
375 PN_EXTERN int pn_messenger_work(pn_messenger_t *messenger, int timeout);
376 
385 
408 PN_EXTERN int pn_messenger_send(pn_messenger_t *messenger, int n);
409 
431 PN_EXTERN int pn_messenger_recv(pn_messenger_t *messenger, int limit);
432 
442 
458 
470 
481 
482 #define PN_CUMULATIVE (0x1)
483 
496 PN_EXTERN int pn_messenger_accept(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
497 
510 PN_EXTERN int pn_messenger_reject(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
511 
519 
527 
590 PN_EXTERN int pn_messenger_route(pn_messenger_t *messenger, const char *pattern,
591  const char *address);
592 
611 PN_EXTERN int pn_messenger_rewrite(pn_messenger_t *messenger, const char *pattern,
612  const char *address);
613 
614 #ifdef __cplusplus
615 }
616 #endif
617 
618 #endif /* messenger.h */