32 #include "packets/Bookmarks.h"
82 result->
Dump(BOOKMARK__RSP_DUMP,
" ");
87 call.
Dump(BOOKMARK__CALL_DUMP);
92 Rsp_CreateFolder result;
93 result.ownerID = ownerID;
95 result.folderName = name;
96 result.creatorID = ownerID;
98 result.Dump(BOOKMARK__RSP_DUMP,
" ");
99 return result.Encode();
103 call.
Dump(BOOKMARK__CALL_DUMP);
104 Call_UpdateFolder
args;
105 if (!args.Decode(&call.
tuple)) {
106 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
119 call.
Dump(BOOKMARK__CALL_DUMP);
124 std::vector< int32 > bmIDs;
129 for (
auto cur : bmIDs) {
143 call.
Dump(BOOKMARK__CALL_DUMP);
144 Call_BookmarkLocation
args;
145 if (!args.Decode(&call.
tuple)) {
146 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
166 }
else if (
sDataMgr.IsStation(args.itemID)) {
168 if (pSE ==
nullptr) {
173 data.
itemID = args.itemID;
180 }
else if (
sDataMgr.IsSolarSystem(args.itemID)) {
190 Rsp_BookmarkLocation result;
193 result.typeID = data.
typeID;
198 result.Dump(BOOKMARK__RSP_DUMP,
" ");
199 return result.Encode();
206 call.
Dump(BOOKMARK__CALL_DUMP);
207 Call_BookmarkScanResult
args;
208 if (!args.Decode(&call.
tuple)) {
209 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
237 Rsp_BookmarkLocation result;
239 result.itemID = data.
itemID;
240 result.typeID = data.
typeID;
245 result.Dump(BOOKMARK__RSP_DUMP,
" ");
246 return result.Encode();
250 call.
Dump(BOOKMARK__CALL_DUMP);
251 Call_DeleteBookmarks
args;
252 if (!args.Decode(&call.
tuple)) {
253 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
257 if (args.object->IsNone())
262 for (
size_t i = 0; i < bmList->
size(); ++i)
275 call.
Dump(BOOKMARK__CALL_DUMP);
276 Call_MoveBookmarksToFolder
args;
277 if (!args.Decode(&call.
tuple)) {
278 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
283 if (args.object->IsNone())
288 std::vector<int32> bmIDs;
289 for (
size_t i = 0; i < bmList->
size(); ++i)
307 call.
Dump(BOOKMARK__CALL_DUMP);
308 Call_AddBookmarkFromVoucher
args;
309 if (!args.Decode(&call.
tuple)) {
310 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
319 if (iRef.
get() ==
nullptr) {
320 codelog(ITEM__ERROR,
"%s: Failed to retrieve bookmark data for voucherID %u", call.
client->
GetName(), args.itemID);
360 return new PyObject(
"util.KeyVal", dict);
371 call.
Dump(BOOKMARK__CALL_DUMP);
372 Call_CopyBookmarks
args;
373 if (!args.Decode(&call.
tuple)) {
374 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
379 if (args.object->IsNone())
385 for (
size_t i = 0; i < bmList->
size(); ++i) {
387 if (iRef.
get() ==
nullptr) {
Dispatcher *const m_dispatch
SystemEntity * GetSE(uint32 entityID) const
static std::string StringContent(PyRep *pRep)
uint32 GetLocationID() const
void GetVoucherData(BmData &data)
#define IsConstellationID(itemID)
uint32 GetSystemID() const
itemID[count] Create count or of the specified() x() y(z)-Jump to the specified position in space.Stopped." ) COMMAND( translocate
PyRep * GetItem(size_t index) const
Returns Python object.
void GetBookmarkByFolderID(int32 folderID, std::vector< int32 > &bmIDs)
std::map< std::string, PyRep * > byname
PyRep * GetBookmarksInFolder(uint32 folderID)
uint32 SaveNewFolder(std::string folderName, uint32 ownerID)
static GPoint GetAnomalyPos(std::string &string)
const std::string & customInfo() const
Python floating point number.
int32 GetCharacterID() const
PyCallable_Make_InnerDispatcher(BookmarkService) BookmarkService
static uint32 IntegerValueU32(PyRep *pRep)
const char * GetName() const
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
const GPoint & GetPosition() const
bool GetBookmarkInformation(uint32 bookmarkID, uint32 &itemID, uint16 &typeID, uint32 &locationID, double &x, double &y, double &z)
bool LookupBookmark(uint32 bookmarkID, uint32 &itemID, uint16 &typeID, uint32 &locationID, double &x, double &y, double &z)
PyRep * GetItem(size_t index) const
Returns Python object.
void ChangeOwner(uint32 bookmarkID, uint32 ownerID=1)
#define IsPlayerItem(itemID)
PyTuple * new_tuple(int64 arg1)
bool UpdateFolder(int32 folderID, std::string folderName)
void SaveNewBookmark(BmData &data)
#define codelog(type, fmt,...)
void SetItem(size_t index, PyRep *object)
Stores Python object.
SystemManager * SystemMgr() const
virtual ~BookmarkService()
const char * GetName() const
#define PyCallable_REG_CALL(c, m)
bool DeleteFolder(int32 folderID)
PyRep * GetBookmarks(uint32 ownerID)
PyRep * GetFolders(uint32 ownerID)
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type()() itemID() copy() materialLevel()() itemID(attributeID)-Retrieves attribute value." ) COMMAND( setattr
void Dump(LogType type) const
void MoveBookmarkToFolder(int32 folderID, std::vector< int32 > *bookmarkList)
Dispatcher *const m_dispatch
#define IsRegionID(itemID)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.