| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  | #ifndef EXCHANGE_HPP_INCLUDED
 | 
					
						
							|  |  |  | #define EXCHANGE_HPP_INCLUDED
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <cstdint>
 | 
					
						
							|  |  |  | #include <string>
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** @addtogroup Interfaces
 | 
					
						
							|  |  |  | * @{ */ | 
					
						
							|  |  |  | class Exchange | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     public: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         typedef enum SLOT_STATE | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |             STATE_EMPTY = 0, | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  |             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, | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |             STATE_DISABLED = 14, | 
					
						
							|  |  |  |             STATE_UNDEFINED = 15 | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  |         } SLOT_STATE; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         typedef enum SLOT_MODE | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             BUY = 0, | 
					
						
							|  |  |  |             SELL = 1, | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |             MODE_DISABLED = 2, | 
					
						
							|  |  |  |             MODE_UNDEFINED = 3 | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  |         } SLOT_MODE; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         static bool IsOpen(); | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |         static bool Open(); | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  |         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(); | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |         static std::int32_t GetOfferIndex(); | 
					
						
							|  |  |  |         static SLOT_MODE GetOfferMode(); | 
					
						
							|  |  |  |         static std::int32_t GetOfferItemID(); | 
					
						
							|  |  |  |         static std::string GetOfferItemName(); | 
					
						
							|  |  |  |         static std::int32_t GetOfferAmount(); | 
					
						
							|  |  |  |         static std::int32_t GetOfferPrice(); | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  |         static bool OfferOpen(); | 
					
						
							|  |  |  |         static bool CloseOffer(); | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |         static bool OffersOpen(); | 
					
						
							|  |  |  |         static bool SlotUseble(const std::uint32_t Slot); | 
					
						
							|  |  |  |         static bool CanCollect(); | 
					
						
							|  |  |  |         static bool Collect(const bool Inventory = true); | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-21 08:43:19 +00:00
										 |  |  |         static bool OpenBuyOffer(); | 
					
						
							|  |  |  |         static bool OpenSellOffer(); | 
					
						
							| 
									
										
										
										
											2018-07-20 09:50:38 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** @} */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // EXCHANGE_HPP_INCLUDED
 |