cbitcoin
 All Data Structures Files Functions Variables Typedefs
src/structures/CBObject/CBMessage/CBInventoryBroadcast/CBInventoryBroadcast.h File Reference

Used to advertise an inventory or ask for an inventory. An inventory is a list of objects which can be blocks or transsactions. Inherits CBMessage. More...

#include "CBInventoryItem.h"

Go to the source code of this file.

Data Structures

struct  CBInventoryBroadcast
 Structure for CBInventoryBroadcast objects. More...

Functions

CBInventoryBroadcastCBNewInventoryBroadcast (void(*onErrorReceived)(CBError error, char *,...))
 Creates a new CBInventoryBroadcast object.
CBInventoryBroadcastCBNewInventoryBroadcastFromData (CBByteArray *data, void(*onErrorReceived)(CBError error, char *,...))
 Creates a new CBInventoryBroadcast object from serialised data.
CBInventoryBroadcastCBGetInventoryBroadcast (void *self)
 Gets a CBInventoryBroadcast from another object. Use this to avoid casts.
bool CBInitInventoryBroadcast (CBInventoryBroadcast *self, void(*onErrorReceived)(CBError error, char *,...))
 Initialises a CBInventoryBroadcast object.
bool CBInitInventoryBroadcastFromData (CBInventoryBroadcast *self, CBByteArray *data, void(*onErrorReceived)(CBError error, char *,...))
 Initialises a CBInventoryBroadcast object from serialised data.
void CBFreeInventoryBroadcast (void *self)
 Frees a CBInventoryBroadcast object.
uint32_t CBInventoryBroadcastCalculateLength (CBInventoryBroadcast *self)
 Calculates the length needed to serialise the object.
uint32_t CBInventoryBroadcastDeserialise (CBInventoryBroadcast *self)
 Deserialises a CBInventoryBroadcast so that it can be used as an object.
uint32_t CBInventoryBroadcastSerialise (CBInventoryBroadcast *self)
 Serialises a CBInventoryBroadcast to the byte data.

Detailed Description

Used to advertise an inventory or ask for an inventory. An inventory is a list of objects which can be blocks or transsactions. Inherits CBMessage.


Function Documentation

void CBFreeInventoryBroadcast ( void *  self)

Frees a CBInventoryBroadcast object.

Parameters:
selfThe CBInventoryBroadcast object to free.

Gets a CBInventoryBroadcast from another object. Use this to avoid casts.

Parameters:
selfThe object to obtain the CBInventoryBroadcast from.
Returns:
The CBInventoryBroadcast object.
bool CBInitInventoryBroadcast ( CBInventoryBroadcast self,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Initialises a CBInventoryBroadcast object.

Parameters:
selfThe CBInventoryBroadcast object to initialise
Returns:
true on success, false on failure.
bool CBInitInventoryBroadcastFromData ( CBInventoryBroadcast self,
CBByteArray data,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Initialises a CBInventoryBroadcast object from serialised data.

Parameters:
selfThe CBInventoryBroadcast object to initialise
dataThe serialised data.
Returns:
true on success, false on failure.

Calculates the length needed to serialise the object.

Parameters:
selfThe CBInventoryBroadcast object.
Returns:
The length read on success, 0 on failure.

Deserialises a CBInventoryBroadcast so that it can be used as an object.

Parameters:
selfThe CBInventoryBroadcast object
Returns:
The length read on success, 0 on failure.

Serialises a CBInventoryBroadcast to the byte data.

Parameters:
selfThe CBInventoryBroadcast object
Returns:
The length written on success, 0 on failure.
CBInventoryBroadcast* CBNewInventoryBroadcast ( void(*)(CBError error, char *,...)  onErrorReceived)

Creates a new CBInventoryBroadcast object.

Returns:
A new CBInventoryBroadcast object.
CBInventoryBroadcast* CBNewInventoryBroadcastFromData ( CBByteArray data,
void(*)(CBError error, char *,...)  onErrorReceived 
)

Creates a new CBInventoryBroadcast object from serialised data.

Parameters:
dataSerialised CBInventoryBroadcast data.
Returns:
A new CBInventoryBroadcast object.