mastodont-c/include/mastodont_application.h
nekobit a37f407ab0 Pls push
FossilOrigin-Name: 8a539b51cabb162548a6220c5aef0f26c96ded8520eb23142bf12e9980e17478
2022-06-23 06:42:43 +00:00

61 lines
1.7 KiB
C

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser 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 Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MASTODONT_APPLICATION
#define MASTODONT_APPLICATION
#include "mastodont_types.h"
#include "mastodont_args.h"
#include "mastodont_fetch.h"
#include <cjson/cJSON.h>
struct mstdnt_application
{
char* name;
char* website;
char* vapid_key;
};
struct mstdnt_app
{
char* id;
char* name;
char* website;
char* redirect_uri;
char* client_id;
char* client_secret;
char* vapid_key;
};
struct mstdnt_oauth_token
{
char* access_token;
char* token_type;
char* scope;
char* id;
char* me;
time_t time;
};
int mastodont_register_app(mastodont_t* data, struct mstdnt_args* args,
struct mstdnt_args* args,
struct mstdnt_storage* storage,
struct mstdnt_app* app);
int mastodont_obtain_oauth_token(mastodont_t* data, struct mstdnt_args* args,
struct mstdnt_args* args,
struct mstdnt_storage* storage,
struct mstdnt_oauth_token* app);
#endif /* MASTODONT_ACCOUNT */