rippled
ripple
resource
impl
Import.h
1
//------------------------------------------------------------------------------
2
/*
3
This file is part of rippled: https://github.com/ripple/rippled
4
Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6
Permission to use, copy, modify, and/or distribute this software for any
7
purpose with or without fee is hereby granted, provided that the above
8
copyright notice and this permission notice appear in all copies.
9
10
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
*/
18
//==============================================================================
19
20
#ifndef RIPPLE_RESOURCE_IMPORT_H_INCLUDED
21
#define RIPPLE_RESOURCE_IMPORT_H_INCLUDED
22
23
#include <ripple/resource/Consumer.h>
24
#include <ripple/resource/impl/Entry.h>
25
26
namespace
ripple
{
27
namespace
Resource {
28
30
struct
Import
31
{
32
struct
Item
33
{
34
explicit
Item
() =
default
;
35
36
int
balance
;
37
Consumer
consumer
;
38
};
39
40
// Dummy argument required for zero-copy construction
41
Import
(
int
= 0) :
whenExpires
()
42
{
43
}
44
45
// When the imported data expires
46
clock_type::time_point
whenExpires
;
47
48
// List of remote entries
49
std::vector<Item>
items
;
50
};
51
52
}
// namespace Resource
53
}
// namespace ripple
54
55
#endif
ripple::Resource::Import
A set of imported consumer data from a gossip origin.
Definition:
Import.h:30
ripple::Resource::Import::Import
Import(int=0)
Definition:
Import.h:41
ripple::Resource::Import::Item::consumer
Consumer consumer
Definition:
Import.h:37
std::vector
STL class.
ripple::Resource::Import::Item
Definition:
Import.h:32
ripple::Resource::Import::Item::Item
Item()=default
ripple::Resource::Import::Item::balance
int balance
Definition:
Import.h:36
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition:
RCLCensorshipDetector.h:29
ripple::Resource::Consumer
An endpoint that consumes resources.
Definition:
Consumer.h:34
ripple::Resource::Import::whenExpires
clock_type::time_point whenExpires
Definition:
Import.h:46
beast::abstract_clock< std::chrono::steady_clock >::time_point
typename std::chrono::steady_clock ::time_point time_point
Definition:
abstract_clock.h:63
ripple::Resource::Import::items
std::vector< Item > items
Definition:
Import.h:49
Generated by
1.8.17