comparison lib/gftp.h @ 988:63555c9744c2

remote charset should be specified by each bookmark entry.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 14 Aug 2009 07:54:55 +0900
parents a490d94a5b8e
children c99b134c6185
comparison
equal deleted inserted replaced
987:2f6924c67846 988:63555c9744c2
90 #include <openssl/rand.h> 90 #include <openssl/rand.h>
91 #include <openssl/ssl.h> 91 #include <openssl/ssl.h>
92 #include <openssl/x509v3.h> 92 #include <openssl/x509v3.h>
93 #endif 93 #endif
94 94
95 #include <locale.h>
95 #ifdef ENABLE_NLS 96 #ifdef ENABLE_NLS
96 #include <libintl.h> 97 #include <libintl.h>
97 #include <locale.h>
98 #define _(String) gettext (String) 98 #define _(String) gettext (String)
99 #else 99 #else
100 #define _(String) String 100 #define _(String) String
101 #endif 101 #endif
102 #define N_(String) String 102 #define N_(String) String
310 310
311 311
312 #define GFTP_CVARS_FLAGS_DYNMEM (1 << 1) 312 #define GFTP_CVARS_FLAGS_DYNMEM (1 << 1)
313 #define GFTP_CVARS_FLAGS_DYNLISTMEM (1 << 2) 313 #define GFTP_CVARS_FLAGS_DYNLISTMEM (1 << 2)
314 #define GFTP_CVARS_FLAGS_SHOW_BOOKMARK (1 << 3) 314 #define GFTP_CVARS_FLAGS_SHOW_BOOKMARK (1 << 3)
315 #define GFTP_CVARS_FLAGS_SHOW_BOOKMARK_ONLY (1 << 4)
315 316
316 typedef struct gftp_config_vars_tag 317 typedef struct gftp_config_vars_tag
317 { 318 {
318 /*@null@*/ char *key, /* variable name */ 319 /*@null@*/ char *key, /* variable name */
319 *description; /* How this field will show up in the dialog */ 320 *description; /* How this field will show up in the dialog */
498 GIConv iconv_to, iconv_from; 499 GIConv iconv_to, iconv_from;
499 unsigned int iconv_from_initialized : 1, 500 unsigned int iconv_from_initialized : 1,
500 iconv_to_initialized : 1; 501 iconv_to_initialized : 1;
501 char *iconv_charset; 502 char *iconv_charset;
502 #endif 503 #endif
504 char *remote_charset;
503 }; 505 };
504 506
505 507
506 typedef struct gftp_transfer_tag 508 typedef struct gftp_transfer_tag
507 { 509 {
593 595
594 unsigned int port, /* The port we will connect to */ 596 unsigned int port, /* The port we will connect to */
595 isfolder : 1, /* If this is set, then the children field can 597 isfolder : 1, /* If this is set, then the children field can
596 be non-NULL */ 598 be non-NULL */
597 save_password : 1; /* Save this password */ 599 save_password : 1; /* Save this password */
600 char *remote_charset;
598 gftp_bookmarks_var *children, /* The children of this node. */ 601 gftp_bookmarks_var *children, /* The children of this node. */
599 *prev, /* The parent of this node */ 602 *prev, /* The parent of this node */
600 *next; /* The next sibling of this node */ 603 *next; /* The next sibling of this node */
601 gpointer cnode; 604 gpointer cnode;
602 605
603 gftp_config_vars * local_options_vars; 606 gftp_config_vars * local_options_vars;
604 int num_local_options_vars; 607 int num_local_options_vars;
605 GHashTable * local_options_hash; 608 GHashTable * local_options_hash;
606 }; 609 };
682 685
683 /*@null@*/ char * gftp_filename_from_utf8 ( gftp_request * request, 686 /*@null@*/ char * gftp_filename_from_utf8 ( gftp_request * request,
684 const char *str, 687 const char *str,
685 size_t *dest_len ); 688 size_t *dest_len );
686 689
690 /*@null@*/ char * gftp_remote_filename_to_utf8 ( gftp_request * request,
691 const char *str,
692 size_t *dest_len );
693
694 /*@null@*/ char * gftp_remote_filename_from_utf8 ( gftp_request * request,
695 const char *str,
696 size_t *dest_len );
697
687 /* config_file.c */ 698 /* config_file.c */
688 int gftp_config_parse_args ( char *str, 699 int gftp_config_parse_args ( char *str,
689 int numargs, 700 int numargs,
690 int lineno, 701 int lineno,
691 /*@out@*/ char **first, 702 /*@out@*/ char **first,
956 off_t * filesize ); 967 off_t * filesize );
957 968
958 void gftp_set_hostname ( gftp_request * request, 969 void gftp_set_hostname ( gftp_request * request,
959 const char *hostname ); 970 const char *hostname );
960 971
972 void gftp_set_remote_charset (gftp_request * request,
973 const char *remote_charset);
974
961 void gftp_set_username ( gftp_request * request, 975 void gftp_set_username ( gftp_request * request,
962 const char *username ); 976 const char *username );
963 977
964 void gftp_set_password ( gftp_request * request, 978 void gftp_set_password ( gftp_request * request,
965 const char *password ); 979 const char *password );