+ case "addDevice":
+ if (dBusConn != null) {
+ System.err.println("link is not yet implemented via dbus");
+ System.exit(1);
+ }
+ if (!m.isRegistered()) {
+ System.err.println("User is not registered.");
+ System.exit(1);
+ }
+ try {
+ m.addDeviceLink(new URI(ns.getString("uri")));
+ } catch (IOException e) {
+ e.printStackTrace();
+ System.exit(3);
+ } catch (InvalidKeyException e) {
+ e.printStackTrace();
+ System.exit(2);
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ System.exit(2);
+ }
+ break;