EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MarketDB.h
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Zhur
24  Updates: Allan
25 */
26 
27 #ifndef __MARKETDB_H_INCL__
28 #define __MARKETDB_H_INCL__
29 
30 
31 #include "packets/Market.h"
32 #include "../../eve-common/EVE_Market.h"
33 
34 #include "ServiceDB.h"
35 
36 class PyRep;
37 
38 class MarketDB
39 : public ServiceDB
40 {
41 public:
43  PyRep* GetOrders(uint32 regionID, uint16 typeID);
44  PyRep* GetOrderRow(uint32 orderID);
45  PyRep* GetRegionBest(uint32 regionID);
46  PyRep* GetSystemAsks(uint32 solarSystemID);
47  PyRep* GetStationAsks(uint32 stationID);
48  PyRep* GetOrdersForOwner(uint32 ownerID);
49 
50  PyRep* GetTransactions(uint32 ownerID, Market::TxData &data);
51 
52  bool DeleteOrder(uint32 orderID);
53  bool GetOrderInfo(uint32 orderID, Market::OrderInfo &oInfo);
54  bool AlterOrderPrice(uint32 orderID, double new_price);
56  bool AlterOrderQuantity(uint32 orderID, uint32 new_qty);
57 
58  uint32 FindBuyOrder(Call_PlaceCharOrder &call);
59  uint32 FindSellOrder(Call_PlaceCharOrder &call);
61 
62 
63  /* for base price estimator */
64  static void GetShipIDs(std::map<uint16, Inv::TypeData>& data);
65  static void GetMineralPrices(std::map< uint16, Market::matlData >& data); // +15% markup
66  static void GetMaterialPrices(std::map< uint16, Market::matlData >& data); // +5% markup
67  static void GetManufacturedItems(std::map<uint16, Inv::TypeData>& data);
68  static void UpdateInvPrice(std::map< uint16, Inv::TypeData >& data);
69  static void UpdateMktPrice(std::map< uint16, Market::matlData >& data);
70 
71  /* for dealing with Crucible price history */
72  static void GetCruPriceAvg(std::map< uint16, Inv::TypeData >& data);
73 
74  /* for marketMgr update service */
75  static int64 GetUpdateTime();
76  static void SetUpdateTime(int64 setTime);
77 
78  static void UpdateHistory();
79 
80 };
81 
82 
83 
84 
85 
86 #endif
87 
88 
Base Python wire object.
Definition: PyRep.h:66
PyRep * GetRegionBest(uint32 regionID)
Definition: MarketDB.cpp:87
bool GetOrderInfo(uint32 orderID, Market::OrderInfo &oInfo)
Definition: MarketDB.cpp:253
PyRep * GetOrdersForOwner(uint32 ownerID)
Definition: MarketDB.cpp:151
PyRep * GetStationAsks(uint32 stationID)
Definition: MarketDB.cpp:43
PyRep * GetTransactions(uint32 ownerID, Market::TxData &data)
Definition: MarketDB.cpp:349
PyRep * GetMarketGroups()
Definition: MarketDB.cpp:401
PyRep * GetOrders(uint32 regionID, uint16 typeID)
Definition: MarketDB.cpp:109
static void GetMineralPrices(std::map< uint16, Market::matlData > &data)
Definition: MarketDB.cpp:543
static void UpdateInvPrice(std::map< uint16, Inv::TypeData > &data)
Definition: MarketDB.cpp:570
bool AlterOrderPrice(uint32 orderID, double new_price)
Definition: MarketDB.cpp:307
PyRep * GetOrderRow(uint32 orderID)
Definition: MarketDB.cpp:172
static void GetShipIDs(std::map< uint16, Inv::TypeData > &data)
Definition: MarketDB.cpp:500
static void GetCruPriceAvg(std::map< uint16, Inv::TypeData > &data)
Definition: MarketDB.cpp:590
bool RecordTransaction(Market::TxData &data)
Definition: MarketDB.cpp:380
static void SetUpdateTime(int64 setTime)
Definition: MarketDB.cpp:470
uint32 FindBuyOrder(Call_PlaceCharOrder &call)
Definition: MarketDB.cpp:196
unsigned __int32 uint32
Definition: eve-compat.h:50
static void GetMaterialPrices(std::map< uint16, Market::matlData > &data)
Definition: MarketDB.cpp:531
signed __int64 int64
Definition: eve-compat.h:51
static void GetManufacturedItems(std::map< uint16, Inv::TypeData > &data)
Definition: MarketDB.cpp:519
bool AlterOrderQuantity(uint32 orderID, uint32 new_qty)
Definition: MarketDB.cpp:298
bool DeleteOrder(uint32 orderID)
Definition: MarketDB.cpp:316
uint32 StoreOrder(Market::SaveData &data)
Definition: MarketDB.cpp:325
unsigned __int16 uint16
Definition: eve-compat.h:48
PyRep * GetSystemAsks(uint32 solarSystemID)
Definition: MarketDB.cpp:65
static void UpdateMktPrice(std::map< uint16, Market::matlData > &data)
Definition: MarketDB.cpp:583
static void UpdateHistory()
Definition: MarketDB.cpp:477
uint32 FindSellOrder(Call_PlaceCharOrder &call)
Definition: MarketDB.cpp:224
static int64 GetUpdateTime()
Definition: MarketDB.cpp:456