exportldif.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
  3. * Copyright (C) 2003-2006 Match Grun and the Claws Mail team
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. */
  19. /*
  20. * Definitions for export to LDIF file.
  21. */
  22. #ifndef __EXPORT_LDIF_H__
  23. #define __EXPORT_LDIF_H__
  24. #include <glib.h>
  25. #include "addrcache.h"
  26. /* RDN ID's */
  27. #define EXPORT_LDIF_ID_UID 0
  28. #define EXPORT_LDIF_ID_DNAME 1
  29. #define EXPORT_LDIF_ID_EMAIL 2
  30. #define EXPORT_LDIF_FIRST_LAST 0
  31. #define EXPORT_LDIF_LAST_FIRST 1
  32. /* Export LDIF control data */
  33. typedef struct _ExportLdifCtl ExportLdifCtl;
  34. struct _ExportLdifCtl {
  35. gchar *path;
  36. gchar *dirOutput;
  37. gchar *fileLdif;
  38. gchar *settingsFile;
  39. gchar *suffix;
  40. gint rdnIndex;
  41. gboolean useDN;
  42. gboolean excludeEMail;
  43. gint retVal;
  44. gint rcCreate;
  45. };
  46. /* Function prototypes */
  47. ExportLdifCtl *exportldif_create ( void );
  48. void exportldif_free ( ExportLdifCtl *ctl );
  49. void exportldif_set_path ( ExportLdifCtl *ctl,
  50. const gchar *value );
  51. void exportldif_set_file_html ( ExportLdifCtl *ctl,
  52. const gchar *value );
  53. void exportldif_set_suffix ( ExportLdifCtl *ctl,
  54. const gchar *value );
  55. void exportldif_set_rdn ( ExportLdifCtl *ctl,
  56. const gint value );
  57. void exportldif_set_use_dn ( ExportLdifCtl *ctl,
  58. const gboolean value );
  59. void exportldif_set_exclude_email ( ExportLdifCtl *ctl,
  60. const gboolean value );
  61. void exportldif_process ( ExportLdifCtl *ctl,
  62. AddressCache *cache );
  63. gboolean exportldif_test_dir ( ExportLdifCtl *ctl );
  64. gboolean exportldif_create_dir ( ExportLdifCtl *ctl );
  65. gchar *exportldif_get_create_msg ( ExportLdifCtl *ctl );
  66. void exportldif_parse_filespec ( ExportLdifCtl *ctl,
  67. gchar *fileSpec );
  68. void exportldif_load_settings ( ExportLdifCtl *ctl );
  69. void exportldif_save_settings ( ExportLdifCtl *ctl );
  70. #endif /* __EXPORT_LDIF_H__ */