2023-11-29 20:39:27 +03:00
|
|
|
/*
|
|
|
|
* libyadisk - A C library for interacting with Yandex.Disk API
|
|
|
|
*
|
|
|
|
* This file is part of libyadisk.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2023 Maxim Slipenko
|
|
|
|
*
|
|
|
|
* 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 library 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/lgpl-3.0.html>.
|
|
|
|
*/
|
2023-11-27 19:50:27 +03:00
|
|
|
|
|
|
|
#ifndef YADISK_YADISK_SHARED_H
|
|
|
|
#define YADISK_YADISK_SHARED_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <curl/curl.h>
|
|
|
|
#include <json.h>
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
YADISK_OK = 0,
|
2023-11-29 13:57:30 +03:00
|
|
|
YADISK_FAILED_PARSE_JSON = 1,
|
|
|
|
YADISK_FAILED_HTTP_REQUEST = 2
|
2023-11-27 19:50:27 +03:00
|
|
|
} yadisk_code;
|
|
|
|
|
2023-11-28 22:13:58 +03:00
|
|
|
typedef struct {
|
2023-11-27 19:50:27 +03:00
|
|
|
char* token;
|
|
|
|
} yadisk_api_client;
|
|
|
|
|
2023-11-29 13:57:30 +03:00
|
|
|
int yadisk_init();
|
|
|
|
void yadisk_cleanup();
|
|
|
|
|
2023-11-27 19:50:27 +03:00
|
|
|
#endif //YADISK_YADISK_SHARED_H
|