/*
Copyright (C) 2019-2020 Toldi Balázs Ádám
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
File created at: 2019. 10. 11.
*/
#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include "lib/map.h"
#include "lib/net.h"
#include
#include
#include
#include
#include
#include
#include
#include "lib/debugmalloc/debugmalloc.h"
#ifndef _WIN32
#define strtok_s(S,T,R) strtok_r(S,T,R)
#endif
//! (MAXIMUM) Ekkora mérető csomagokat küld el a program alapértelmezetten.
#define DEFAULT_BUFLEN 4096
/*!
* @brief Generál egy \p len(+1 a lezáró nullának) méretű karaktertömböt,amit feltölt véletlenszerű base58-as karakterekkel
* @param[in] len A generálandó sztring hossza
* @return A generált sztring
*/
char* generateSeed(int len);
/*!
* @brief Értelmez egy megadott csomag sztringjét
* A csomagok formátuma:
*
* - A csomag első karakterének kukac karakternek(@) kell lennie
* - A kulcsokat és a hozzájuk tartozó értékeket egyenlőségjel(=) választja el
* - Az egyes paramétereket AND jel(&) választja el
*
* Példa \code
* @id=84uzkhv4vMuu2PRD&port=6327&nickname=ToldiBalazs
* \endcode
* @param[in] text Az értelmezendő sztring
* @return Map,ami tartalmazza a kulcsokat és a hozzájuk rendelt értékeket
* @note A szöveg nem tartalmazhat Entert,tabulátort vagy szóközt.
*/
Map getPacketData(char* text);
/**
* @brief Kiír egy üzenetet dátummal az elején és sor vége jellel a végén a képernyőre,valamint a log.txt fájlba
* @param _Format Lásd printf
* @param ...
*/
void logger_log(const char* _Format, ...);