57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
|
#ifndef EXCHANGE_HPP_INCLUDED
|
||
|
#define EXCHANGE_HPP_INCLUDED
|
||
|
|
||
|
#include <cstdint>
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
/** @addtogroup Interfaces
|
||
|
* @{ */
|
||
|
class Exchange
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
typedef enum SLOT_STATE
|
||
|
{
|
||
|
EMPTY = 0,
|
||
|
STARTING_BUY_OFFER = 1,
|
||
|
BUY_OFFER_INCOMPLETE = 2,
|
||
|
BUY_OFFER_UPDATING = 3,
|
||
|
BUY_OFFER_CANCELING = 4,
|
||
|
BUY_OFFER_COMPLETE = 5,
|
||
|
STARTING_SELL_OFFER = 9,
|
||
|
SELL_OFFER_INCOMPLETE = 10,
|
||
|
SELL_OFFER_UPDATING = 11,
|
||
|
SELL_OFFER_CANCELING = 12,
|
||
|
SELL_OFFER_COMPLETE = 13,
|
||
|
STATE_UNDEFINED = 14
|
||
|
} SLOT_STATE;
|
||
|
|
||
|
typedef enum SLOT_MODE
|
||
|
{
|
||
|
BUY = 0,
|
||
|
SELL = 1,
|
||
|
MODE_UNDEFINED = 2
|
||
|
} SLOT_MODE;
|
||
|
|
||
|
static bool IsOpen();
|
||
|
static bool Close();
|
||
|
static SLOT_STATE GetSlotState(const std::uint32_t Slot);
|
||
|
static bool SlotOccupied(const std::uint32_t Slot);
|
||
|
static std::vector<SLOT_STATE> GetAllSlotStates();
|
||
|
static bool AllSlotsOccupied();
|
||
|
static std::int32_t GetCurrentSlotIndex();
|
||
|
static SLOT_MODE GetCurrentSlotMode();
|
||
|
static std::int32_t GetCurrentSlotItemID();
|
||
|
static std::string GetCurrentSlotItemName();
|
||
|
static std::int32_t GetCurrentSlotAmount();
|
||
|
static std::int32_t GetCurrentSlotPrice();
|
||
|
static bool OfferOpen();
|
||
|
static bool CloseOffer();
|
||
|
|
||
|
};
|
||
|
|
||
|
/** @} */
|
||
|
|
||
|
#endif // EXCHANGE_HPP_INCLUDED
|