return addrIndex->interfaceList;
}
+/**
+ * Perform any other initialization of address index.
+ * \param addrIndex Address index.
+ */
+void addrindex_initialize( AddressIndex *addrIndex ) {
+ addrcompl_initialize();
+}
+
+/**
+ * Perform any other teardown of address index.
+ * \param addrIndex Address index.
+ */
+void addrindex_teardown( AddressIndex *addrIndex ) {
+ addrcompl_teardown();
+}
+
/**
* Free up address index.
* \param addrIndex Address index.
}
}
-#else
-/*
- * Just read/write DOM fragments (preserve data found in file).
- */
-static AddressDataSource *addrindex_parse_jpilot( XMLFile *file ) {
- AddressDataSource *ds;
-
- ds = addrindex_create_datasource( ADDR_IF_JPILOT );
- ds->rawDataSource = addrindex_read_fragment( file );
- return ds;
-}
-
-static void addrindex_write_jpilot( FILE *fp, AddressDataSource *ds, gint lvl ) {
- AddressIfFragment *fragment = ds->rawDataSource;
- if( fragment ) {
- addrindex_write_fragment( fp, fragment, lvl );
- }
-}
#endif
#ifdef USE_LDAP
attr = g_list_next( attr );
}
- server = ldapsvr_create();
+ server = ldapsvr_create_noctl();
ldapsvr_set_name( server, serverName );
ldapsvr_set_search_flag( server, bSearch );
g_free( serverName );
addrindex_write_elem_e( fp, lvl, TAG_DS_LDAP );
}
-
-#else
-/*
- * Just read/write DOM fragments (preserve data found in file).
- */
-static AddressDataSource *addrindex_parse_ldap( XMLFile *file ) {
- AddressDataSource *ds;
-
- ds = addrindex_create_datasource( ADDR_IF_LDAP );
- ds->rawDataSource = addrindex_read_fragment( file );
- return ds;
-}
-
-static void addrindex_write_ldap( FILE *fp, AddressDataSource *ds, gint lvl ) {
- AddressIfFragment *fragment = ds->rawDataSource;
- if( fragment ) {
- addrindex_write_fragment( fp, fragment, lvl );
- }
-}
#endif
/* **********************************************************************
else if( addrIndex->lastType == ADDR_IF_VCARD ) {
ds = addrindex_parse_vcard( file );
}
+#ifdef USE_JPILOT
else if( addrIndex->lastType == ADDR_IF_JPILOT ) {
ds = addrindex_parse_jpilot( file );
}
+#endif
+#ifdef USE_LDAP
else if( addrIndex->lastType == ADDR_IF_LDAP ) {
ds = addrindex_parse_ldap( file );
}
+#endif
if( ds ) {
ds->interface = dsIFace;
addrindex_hash_add_cache( addrIndex, ds );
if( iface->type == ADDR_IF_VCARD ) {
addrindex_write_vcard( fp, ds, lvlItem );
}
+#ifdef USE_JPILOT
if( iface->type == ADDR_IF_JPILOT ) {
addrindex_write_jpilot( fp, ds, lvlItem );
}
+#endif
+#ifdef USE_LDAP
if( iface->type == ADDR_IF_LDAP ) {
addrindex_write_ldap( fp, ds, lvlItem );
}
+#endif
}
nodeDS = g_list_next( nodeDS );
}
gchar *name;
if( ! server->searchFlag ) return;
- printf( "Searching ::%s::\n", ldapsvr_get_name( server ) );
+ /* printf( "Searching ::%s::\n", ldapsvr_get_name( server ) ); */
/* Retire any aged queries */
ldapsvr_retire_query( server );