2005-10-25 [colin] 1.9.15cvs107
[claws.git] / src / addrindex.c
index 2586fc94941f27ff64058731614571768202d59e..2a8f4680a41f5203ecb7b85c413ddffe2cf1090c 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 /*
@@ -28,8 +28,8 @@
 #include "defs.h"
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
-#include "intl.h"
 #include "mgutils.h"
 #include "addritem.h"
 #include "addrcache.h"
@@ -38,6 +38,7 @@
 #include "xml.h"
 #include "addrquery.h"
 #include "addr_compl.h"
+#include "utils.h"
 
 #ifndef DEV_STANDALONE
 #include "prefs_gtk.h"
@@ -54,6 +55,7 @@
 #include "ldapserver.h"
 #include "ldapctrl.h"
 #include "ldapquery.h"
+#include "ldaputil.h"
 #endif
 
 #define TAG_ADDRESS_INDEX    "addressbook"
@@ -579,9 +581,7 @@ static gboolean addrindex_free_cache_cb( gpointer key, gpointer value, gpointer
  * Free hash table of address cache items.
  */
 static void addrindex_free_cache_hash( GHashTable *table ) {
-       g_hash_table_freeze( table );
        g_hash_table_foreach_remove( table, addrindex_free_cache_cb, NULL );
-       g_hash_table_thaw( table );
        g_hash_table_destroy( table );
 }
 
@@ -1337,6 +1337,7 @@ static void addrindex_parse_ldap_attrlist( XMLFile *file, LdapControl *ctl ) {
 
 }
 
+void ldapsvr_set_control( LdapServer *server, LdapControl *ctl );
 /**
  * Parse LDAP control data from XML file.
  * \param  file Index file.
@@ -1713,7 +1714,7 @@ gint addrindex_write_to( AddressIndex *addrIndex, const gchar *newFile ) {
        fileSpec = g_strconcat( addrIndex->filePath, G_DIR_SEPARATOR_S, newFile, NULL );
        addrIndex->retVal = MGU_OPEN_FILE;
 #ifdef DEV_STANDALONE
-       fp = fopen( fileSpec, "wb" );
+       fp = g_fopen( fileSpec, "wb" );
        g_free( fileSpec );
        if( fp ) {
                fputs( "<?xml version=\"1.0\" ?>\n", fp );
@@ -1851,6 +1852,7 @@ static AddressCvtNode *addrindex_parse_item( XMLFile *file ) {
                if( xml_compare_tag( file, ELTAG_IF_OLD_REMARKS ) ) {
                        nn->remarks = g_strdup( element );
                }
+               g_free(element);
                xml_parse_next_tag(file);
        }
 }
@@ -2539,6 +2541,7 @@ LdapQuery *ldapsvr_new_dynamic_search(
                LdapServer *server, QueryRequest *req );
 LdapQuery *ldapsvr_new_explicit_search(
                LdapServer *server, QueryRequest *req, ItemFolder *folder );
+void ldapsvr_execute_query( LdapServer *server, LdapQuery *qry );
 
 #endif