C AMQP Protocol Engine API  0.4
 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 {
45 
46 typedef enum {
51 } pn_status_t;
52 
60 PN_EXTERN pn_messenger_t *pn_messenger(const char *name);
61 
68 PN_EXTERN const char *pn_messenger_name(pn_messenger_t *messenger);
69 
77 PN_EXTERN int pn_messenger_set_certificate(pn_messenger_t *messenger, const char *certificate);
78 
85 
93 PN_EXTERN int pn_messenger_set_private_key(pn_messenger_t *messenger, const char *private_key);
94 
101 
109 PN_EXTERN int pn_messenger_set_password(pn_messenger_t *messenger, const char *password);
110 
116 PN_EXTERN const char *pn_messenger_get_password(pn_messenger_t *messenger);
117 
125 PN_EXTERN int pn_messenger_set_trusted_certificates(pn_messenger_t *messenger, const char *cert_db);
126 
133 
142 PN_EXTERN int pn_messenger_set_timeout(pn_messenger_t *messenger, int timeout);
143 
151 
158 
167 
175 PN_EXTERN const char *pn_messenger_error(pn_messenger_t *messenger);
176 
185 
200 
209 
221 PN_EXTERN int pn_messenger_set_outgoing_window(pn_messenger_t *messenger, int window);
222 
231 
244 PN_EXTERN int pn_messenger_set_incoming_window(pn_messenger_t *messenger, int window);
245 
255 
265 
273 PN_EXTERN pn_subscription_t *pn_messenger_subscribe(pn_messenger_t *messenger, const char *source);
274 
276 
278 
288 
297 PN_EXTERN pn_status_t pn_messenger_status(pn_messenger_t *messenger, pn_tracker_t tracker);
298 
310 PN_EXTERN int pn_messenger_settle(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
311 
321 
331 
344 PN_EXTERN int pn_messenger_recv(pn_messenger_t *messenger, int n);
345 
356 
366 
368 
369 #define PN_CUMULATIVE (0x1)
370 
382 PN_EXTERN int pn_messenger_accept(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
383 
395 PN_EXTERN int pn_messenger_reject(pn_messenger_t *messenger, pn_tracker_t tracker, int flags);
396 
404 
412 
413 #ifdef __cplusplus
414 }
415 #endif
416 
417 #endif /* messenger.h */