2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 2001-2012 Match Grun and the Claws Mail team
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 3 of the License, or
8 * (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * Definitions for accessing JPilot database files.
22 * JPilot is Copyright(c) by Judd Montgomery.
23 * Visit http://www.jpilot.org for more details.
30 #include "claws-features.h"
38 #ifdef HAVE_LIBPISOCK_PI_ADDRESS_H
39 # include <libpisock/pi-address.h>
41 # include <pi-address.h>
45 #include "addrcache.h"
46 #include "adbookbase.h"
48 typedef struct _JPilotFile JPilotFile
;
52 AddressCache
*addressCache
;
56 struct AddressAppInfo addrInfo
;
57 gboolean readMetadata
;
65 #define JPILOT_NUM_LABELS 22 /* Number of labels */
66 #define JPILOT_NUM_PHONELABELS 8 /* Number of phone number labels */
67 #define JPILOT_NUM_CATEG 16 /* Number of categories */
68 #define JPILOT_LEN_LABEL 15 /* Max length of label */
69 #define JPILOT_LEN_CATEG 15 /* Max length of category */
70 #define JPILOT_NUM_ADDR_PHONE 5 /* Number of phone entries a person */
73 /* Function prototypes */
74 JPilotFile
*jpilot_create ( void );
75 JPilotFile
*jpilot_create_path ( const gchar
*path
);
76 void jpilot_set_name ( JPilotFile
* pilotFile
, const gchar
*value
);
77 void jpilot_set_file ( JPilotFile
* pilotFile
, const gchar
*value
);
78 void jpilot_free ( JPilotFile
*pilotFile
);
79 gint
jpilot_get_status ( JPilotFile
*pilotFile
);
80 gboolean
jpilot_get_modified ( JPilotFile
*pilotFile
);
81 gboolean
jpilot_get_accessed ( JPilotFile
*pilotFile
);
82 void jpilot_set_accessed ( JPilotFile
*pilotFile
, const gboolean value
);
83 gboolean
jpilot_get_read_flag ( JPilotFile
*pilotFile
);
84 ItemFolder
*jpilot_get_root_folder ( JPilotFile
*pilotFile
);
85 gchar
*jpilot_get_name ( JPilotFile
*pilotFile
);
87 gint
jpilot_read_data ( JPilotFile
*pilotFile
);
88 GList
*jpilot_get_list_person ( JPilotFile
*pilotFile
);
89 GList
*jpilot_get_list_folder ( JPilotFile
*pilotFile
);
90 GList
*jpilot_get_all_persons ( JPilotFile
*pilotFile
);
92 GList
*jpilot_load_custom_label ( JPilotFile
*pilotFile
, GList
*labelList
);
94 gchar
*jpilot_find_pilotdb ( void );
97 void jpilot_clear_custom_labels ( JPilotFile
*pilotFile
);
98 void jpilot_add_custom_label ( JPilotFile
*pilotFile
, const gchar
*labelName
);
99 GList
*jpilot_get_custom_labels ( JPilotFile
*pilotFile
);
100 gboolean
jpilot_test_custom_label ( JPilotFile
*pilotFile
, const gchar
*labelName
);
101 gboolean
jpilot_test_pilot_lib ( void );
103 gint
jpilot_read_modified ( JPilotFile
*pilotFile
);
105 #endif /* USE_JPILOT */
107 #endif /* __JPILOT_H__ */