webdav-gtk/inc/backend.h

38 lines
1.1 KiB
C

/*
webdav-gtk A WebDAV client written with gtk-3.0 and libneon
Copyright (C) 2022 Xavier Del Campo
This program 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
(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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BACKEND_H
#define BACKEND_H
#include <stdbool.h>
struct backend_cfg
{
const char *hostname;
const char *username, *password;
bool use_encryption;
void (*conn_status)(const char *status, void *user_data);
void *user_data;
};
typedef void *backend_session;
backend_session backend_connect(const struct backend_cfg *cfg, const char **error);
#endif /* BACKEND_H */