24#ifndef _INTERFACES_PROTOBUFPEERINTERFACE_H_
25#define _INTERFACES_PROTOBUFPEERINTERFACE_H_
27#include <interface/interface.h>
28#include <interface/message.h>
29#include <interface/field_iterator.h>
44 int64_t timestamp_sec;
45 int64_t timestamp_usec;
47 } ProtobufPeerInterface_data_t;
49 ProtobufPeerInterface_data_t *data;
58 int64_t timestamp_sec;
59 int64_t timestamp_usec;
62 } CreatePeerMessage_data_t;
64 CreatePeerMessage_data_t *data;
77 void set_port(
const int32_t new_port);
87 int64_t timestamp_sec;
88 int64_t timestamp_usec;
92 } CreatePeerLocalMessage_data_t;
94 CreatePeerLocalMessage_data_t *data;
97 CreatePeerLocalMessage(
const char * ini_address,
const int32_t ini_send_to_port,
const int32_t ini_recv_on_port);
120 int64_t timestamp_sec;
121 int64_t timestamp_usec;
126 } CreatePeerCryptoMessage_data_t;
128 CreatePeerCryptoMessage_data_t *data;
131 CreatePeerCryptoMessage(
const char * ini_address,
const int32_t ini_port,
const char * ini_crypto_key,
const char * ini_cipher);
140 int32_t
port()
const;
141 void set_port(
const int32_t new_port);
157 int64_t timestamp_sec;
158 int64_t timestamp_usec;
164 } CreatePeerLocalCryptoMessage_data_t;
166 CreatePeerLocalCryptoMessage_data_t *data;
169 CreatePeerLocalCryptoMessage(
const char * ini_address,
const int32_t ini_send_to_port,
const int32_t ini_recv_on_port,
const char * ini_crypto_key,
const char * ini_cipher);
200 int64_t *
peers()
const;
201 int64_t
peers(
unsigned int index)
const;
202 void set_peers(
unsigned int index,
const int64_t new_peers);
203 void set_peers(
const int64_t * new_peers);
208 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
Base class for all Fawkes BlackBoard interfaces.
const char * type() const
Get type of interface.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
CreatePeerCryptoMessage Fawkes BlackBoard Interface Message.
int32_t port() const
Get port value.
void set_cipher(const char *new_cipher)
Set cipher value.
virtual Message * clone() const
Clone this message.
char * cipher() const
Get cipher value.
void set_address(const char *new_address)
Set address value.
size_t maxlenof_cipher() const
Get maximum length of cipher value.
void set_port(const int32_t new_port)
Set port value.
char * address() const
Get address value.
size_t maxlenof_crypto_key() const
Get maximum length of crypto_key value.
size_t maxlenof_port() const
Get maximum length of port value.
CreatePeerCryptoMessage()
Constructor.
void set_crypto_key(const char *new_crypto_key)
Set crypto_key value.
size_t maxlenof_address() const
Get maximum length of address value.
~CreatePeerCryptoMessage()
Destructor.
char * crypto_key() const
Get crypto_key value.
CreatePeerLocalCryptoMessage Fawkes BlackBoard Interface Message.
char * cipher() const
Get cipher value.
int32_t send_to_port() const
Get send_to_port value.
size_t maxlenof_send_to_port() const
Get maximum length of send_to_port value.
~CreatePeerLocalCryptoMessage()
Destructor.
size_t maxlenof_recv_on_port() const
Get maximum length of recv_on_port value.
void set_send_to_port(const int32_t new_send_to_port)
Set send_to_port value.
void set_crypto_key(const char *new_crypto_key)
Set crypto_key value.
size_t maxlenof_cipher() const
Get maximum length of cipher value.
void set_address(const char *new_address)
Set address value.
CreatePeerLocalCryptoMessage()
Constructor.
void set_recv_on_port(const int32_t new_recv_on_port)
Set recv_on_port value.
virtual Message * clone() const
Clone this message.
char * address() const
Get address value.
size_t maxlenof_crypto_key() const
Get maximum length of crypto_key value.
void set_cipher(const char *new_cipher)
Set cipher value.
char * crypto_key() const
Get crypto_key value.
size_t maxlenof_address() const
Get maximum length of address value.
int32_t recv_on_port() const
Get recv_on_port value.
CreatePeerLocalMessage Fawkes BlackBoard Interface Message.
~CreatePeerLocalMessage()
Destructor.
char * address() const
Get address value.
void set_send_to_port(const int32_t new_send_to_port)
Set send_to_port value.
void set_recv_on_port(const int32_t new_recv_on_port)
Set recv_on_port value.
int32_t recv_on_port() const
Get recv_on_port value.
size_t maxlenof_send_to_port() const
Get maximum length of send_to_port value.
void set_address(const char *new_address)
Set address value.
int32_t send_to_port() const
Get send_to_port value.
CreatePeerLocalMessage()
Constructor.
size_t maxlenof_address() const
Get maximum length of address value.
size_t maxlenof_recv_on_port() const
Get maximum length of recv_on_port value.
virtual Message * clone() const
Clone this message.
CreatePeerMessage Fawkes BlackBoard Interface Message.
~CreatePeerMessage()
Destructor.
int32_t port() const
Get port value.
char * address() const
Get address value.
size_t maxlenof_port() const
Get maximum length of port value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_address() const
Get maximum length of address value.
void set_address(const char *new_address)
Set address value.
void set_port(const int32_t new_port)
Set port value.
CreatePeerMessage()
Constructor.
ProtobufPeerInterface Fawkes BlackBoard Interface.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
virtual Message * create_message(const char *type) const
Create message based on type name.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_peers() const
Get maximum length of peers value.
int64_t * peers() const
Get peers value.
void set_peers(unsigned int index, const int64_t new_peers)
Set peers value at given index.
virtual void copy_values(const Interface *other)
Copy values from other interface.
Fawkes library namespace.