53 lines
2.2 KiB
C++
53 lines
2.2 KiB
C++
/**
|
|
This file is a part of rexy's matrix client
|
|
Copyright (C) 2019 rexy712
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef FAT_STRINGS_HPP
|
|
#define FAT_STRINGS_HPP
|
|
|
|
//Moved all the really thicc templates into this separate support file
|
|
//so that rebuilding matrix.cpp would not take 10 seconds each time
|
|
//these functions should rarely change, so it will still build slowly
|
|
//but will rarely need rebuilt
|
|
|
|
#include "raii/string.hpp"
|
|
#include "matrix/upload_info.hpp"
|
|
|
|
namespace matrix::json{
|
|
raii::static_string _empty(void);
|
|
|
|
raii::string _image_body(const uploaded_image& image);
|
|
raii::string _video_body(const uploaded_video& video);
|
|
raii::string _file_body(const uploaded_file& video);
|
|
raii::string _audio_body(const uploaded_audio& audio);
|
|
raii::string _message_body(const raii::string_base& text);
|
|
raii::string _login_password(const raii::string_base& userid, const raii::string_base& password);
|
|
raii::string _change_psk_password(const raii::string_base& userid, const raii::string_base& newpass, const raii::string_base& oldpass, const raii::string_base& session);
|
|
|
|
raii::string _displayname_set(const raii::string_base& newname);
|
|
raii::string _avatar_set(const raii::string_base& mediaurl);
|
|
raii::string _presence_set(const raii::string_base& status);
|
|
raii::string _create_room(const raii::string_base& name, const raii::string_base& alias);
|
|
raii::string _userid(const raii::string_base& id);
|
|
raii::string _userid_reason(const raii::string_base& id, const raii::string_base& reason);
|
|
raii::string _typing(bool active, int timeout);
|
|
raii::string _redact(const raii::string_base& reason);
|
|
raii::string _room_upgrade(int version);
|
|
}
|
|
|
|
#endif
|