}
}
-#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
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 );
}