RmFtp
RmFtp — Small ftp library
|
|
Stability Level
Stable, unless otherwise indicated
Description
Provides basic FTP functionality for interacting with the router.
Functions
rm_ftp_send_command ()
gboolean
rm_ftp_send_command (RmFtp *client
,
gchar *command
);
Send FTP command through io channel
Returns
TRUE if data is available, FALSE on error
rm_ftp_login ()
gboolean
rm_ftp_login (RmFtp *client
,
const gchar *user
,
const gchar *password
);
Login to FTP server
Returns
TRUE
if login was successfull, otherwise FALSE
rm_ftp_passive ()
gboolean
rm_ftp_passive (RmFtp *client
);
Switch FTP transfer to passive mode
Returns
result, TRUE
for success, FALSE
on error
rm_ftp_list_dir ()
gchar *
rm_ftp_list_dir (RmFtp *client
,
const gchar *dir
);
List FTP directory
Returns
directory listing
rm_ftp_get_file ()
gchar *
rm_ftp_get_file (RmFtp *client
,
const gchar *file
,
gsize *len
);
Get file of FTP
Returns
file data or NULL
on error
rm_ftp_put_file ()
gboolean
rm_ftp_put_file (RmFtp *client
,
const gchar *file
,
const gchar *path
,
gchar *data
,
gsize size
);
Put file on FTP
Returns
TRUE on success, otherwise FALSE
rm_ftp_init ()
RmFtp *
rm_ftp_init (const gchar *server
);
Initialize ftp structure
Returns
ftp structure or NULL on error
rm_ftp_delete_file ()
gboolean
rm_ftp_delete_file (RmFtp *client
,
const gchar *file
);
Delete file on FTP.
Returns
TRUE
on success, otherwise FALSE
rm_ftp_shutdown ()
gboolean
rm_ftp_shutdown (RmFtp *client
);
Shutdown ftp structure (close sockets and free memory)
Returns
TRUE
on success, otherwise FALSE
Types and Values
RmFtp
typedef struct {
} RmFtp;
The RmFtp contains only private fileds and should not be directly accessed.