libyadisk/src/yadisk_shared.h

43 lines
1.2 KiB
C

/*
* 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>.
*/
#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,
YADISK_FAILED_PARSE_JSON = 1,
YADISK_FAILED_HTTP_REQUEST = 2
} yadisk_code;
typedef struct {
char* token;
} yadisk_api_client;
int yadisk_init();
void yadisk_cleanup();
#endif //YADISK_YADISK_SHARED_H