/*
* This file is part of uIRC. (https://git.redxen.eu/caskd/uIRC)
* Copyright (c) 2019-2021 Alex-David Denes
*
* uIRC 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
* any later version.
*
* uIRC 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 uIRC. If not, see .
*/
/*! \file */
#include "types.h" // IRC_User
#include // llist_t
#include // bool
#ifndef UIRC_GUARD_PUBLIC_TOKENIZERS
#define UIRC_GUARD_PUBLIC_TOKENIZERS
#ifdef UIRC_FEATURE_IRCV3
/*!
* \brief Tokenize IRCv3 tags
*
* This function parses IRCv3 tags according to the specification at
* \param[in] str String containing a IRC source with or without the ':' prefix
*/
llist_t* uirc_tokenizer_tag_list(const char* str);
IRC_Tag* uirc_tokenizer_tag(const char* str);
#endif /* UIRC_FEATURE_IRCV3 */
/*!
* \brief Tokenize a IRC message source.
*
* This function takes the source part of a message, pointing struct elements to parts of it.
* \param[in] str String containing a IRC source with or without the ':' prefix
*/
IRC_User* uirc_tokenizer_user(const char* str);
/*!
* \brief Tokenize a IRC message string.
*
* This function takes a IRC message and attempts to tokenize/parse it, pointing every element found to it's respective struct element
* \param[in] str String containing a IRC message without the ending '\\r\\n'
*/
IRC_Message* uirc_tokenizer_message(const char* str);
#endif /* UIRC_GUARD_PUBLIC_TOKENIZERS */