--
-- Initialization data for the pSync module
--
-- Module structure registration
--
delete from fnbl_module where id='psync';
insert into fnbl_module (id, name, description) values('psync','psync','pSync');

delete from fnbl_connector where id='psync';
insert into fnbl_connector(id, name, description) values('psync','Funambol pSync Connector','Funambol pSync Connector');

--
-- SyncSource Types
--
delete from fnbl_sync_source_type where id='contact';
insert into fnbl_sync_source_type(id, description, class, admin_class)
values('contact','PIM Contact SyncSource','br.com.prognus.psync.engine.source.PIMContactSyncSource','br.com.prognus.psync.admin.PIMContactSyncSourceConfigPanel');

delete from fnbl_sync_source_type where id='calendar';
insert into fnbl_sync_source_type(id, description, class, admin_class)
values('calendar','PIM Calendar SyncSource','br.com.prognus.psync.engine.source.PIMCalendarSyncSource','br.com.prognus.psync.admin.PIMCalendarSyncSourceConfigPanel');


--
-- Connectors
--
delete from fnbl_connector_source_type where connector='psync' and sourcetype='contact';
insert into fnbl_connector_source_type(connector, sourcetype) values('psync','contact');

delete from fnbl_connector_source_type where connector='psync' and sourcetype='calendar';
insert into fnbl_connector_source_type(connector, sourcetype) values('psync','calendar');

--
-- Module - Connector
--
delete from fnbl_module_connector where module='psync' and connector='psync';
insert into fnbl_module_connector(module, connector) values('psync','psync');

--
-- SyncSources
--
delete from fnbl_client_mapping
where (sync_source='catalogo' or sync_source='calendario');

delete from fnbl_last_sync
where (sync_source='catalogo' or sync_source='calendario');


delete from fnbl_sync_source where uri='catalogo';
insert into fnbl_sync_source (uri, config, name, sourcetype)
  values('catalogo', 'psync/contact/VCardSource.xml','catalogo','contact');

delete from fnbl_sync_source where uri='calendario';
insert into fnbl_sync_source (uri, config, name, sourcetype)
  values('calendario', 'psync/calendar/VEventSource.xml','calendario','calendar');
