| 1 |
#ifndef _PROTON_STORE_H |
| 2 |
#define _PROTON_STORE_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 "core/buffer.h" |
| 26 |
|
| 27 |
typedef struct pni_store_t pni_store_t; |
| 28 |
typedef struct pni_entry_t pni_entry_t; |
| 29 |
|
| 30 |
pni_store_t *pni_store(void); |
| 31 |
void pni_store_free(pni_store_t *store); |
| 32 |
size_t pni_store_size(pni_store_t *store); |
| 33 |
pni_entry_t *pni_store_put(pni_store_t *store, const char *address); |
| 34 |
pni_entry_t *pni_store_get(pni_store_t *store, const char *address); |
| 35 |
|
| 36 |
pn_buffer_t *pni_entry_bytes(pni_entry_t *entry); |
| 37 |
pn_status_t pni_entry_get_status(pni_entry_t *entry); |
| 38 |
void pni_entry_set_status(pni_entry_t *entry, pn_status_t status); |
| 39 |
pn_delivery_t *pni_entry_get_delivery(pni_entry_t *entry); |
| 40 |
void pni_entry_set_delivery(pni_entry_t *entry, pn_delivery_t *delivery); |
| 41 |
void pni_entry_set_context(pni_entry_t *entry, void *context); |
| 42 |
void *pni_entry_get_context(pni_entry_t *entry); |
| 43 |
void pni_entry_updated(pni_entry_t *entry); |
| 44 |
void pni_entry_free(pni_entry_t *entry); |
| 45 |
|
| 46 |
pn_sequence_t pni_entry_track(pni_entry_t *entry); |
| 47 |
pni_entry_t *pni_store_entry(pni_store_t *store, pn_sequence_t id); |
| 48 |
int pni_store_update(pni_store_t *store, pn_sequence_t id, pn_status_t status, |
| 49 |
int flags, bool settle, bool match); |
| 50 |
int pni_store_get_window(pni_store_t *store); |
| 51 |
void pni_store_set_window(pni_store_t *store, int window); |
| 52 |
|
| 53 |
|
| 54 |
#endif /* store.h */ |