--- /dev/null
+package de.j32.pimstuff.conduit;
+
+import java.io.IOException;
+
+import org.xml.sax.SAXException;
+
+import de.j32.avmfritz.FritzBox;
+
+public class FritzAddressbookConduit
+ implements Conduit
+{
+ FritzBox fb_;
+
+ public FritzAddressbookConduit()
+ throws ConduitException
+ {
+ try {
+ fb_ = new FritzBox(
+ Config.get("fritzbox-password"),
+ Config.get("fritzbox-url","http://fritz.box"));
+ } catch (SAXException e) {
+ throw new ConduitException(e);
+ } catch (IOException e) {
+ throw new ConduitException(e);
+ }
+ }
+
+ @Override
+ public Exporter exporter()
+ throws ConduitException
+ {
+ try {
+ return new FritzAddressbookExporter(fb_.importAddressbook());
+ }
+ catch (IOException e) {
+ throw new ConduitException(e);
+ }
+ }
+
+ @Override
+ public Importer importer()
+ throws ConduitException
+ {
+ try {
+ return new FritzAddressbookImporter(fb_.exportAddressbook());
+ }
+ catch (IOException e) {
+ throw new ConduitException(e);
+ } catch (SAXException e) {
+ throw new ConduitException(e);
+ }
+ }
+}