Advertisement
Guest User

Untitled

a guest
Jul 25th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 8.08 KB | None | 0 0
  1. package org.freedesktop;
  2. import java.util.List;
  3. import java.util.Map;
  4. import org.freedesktop.dbus.*;
  5. import org.freedesktop.dbus.DBusInterface;
  6. import org.freedesktop.dbus.DBusSignal;
  7. import org.freedesktop.dbus.UInt32;
  8. import org.freedesktop.dbus.Variant;
  9. import org.freedesktop.dbus.exceptions.DBusException;
  10.  
  11. public interface NetworkManager extends DBusInterface
  12. {
  13.    public static class DeviceRemoved extends DBusSignal
  14.    {
  15.       public final DBusInterface a;
  16.       public DeviceRemoved(String path, DBusInterface a) throws DBusException
  17.       {
  18.          super(path, a);
  19.          this.a = a;
  20.       }
  21.    }
  22.    public static class DeviceAdded extends DBusSignal
  23.    {
  24.       public final DBusInterface a;
  25.       public DeviceAdded(String path, DBusInterface a) throws DBusException
  26.       {
  27.          super(path, a);
  28.          this.a = a;
  29.       }
  30.    }
  31.    public static class PropertiesChanged extends DBusSignal
  32.    {
  33.       public final Map<String,Variant> a;
  34.       public PropertiesChanged(String path, Map<String,Variant> a) throws DBusException
  35.       {
  36.          super(path, a);
  37.          this.a = a;
  38.       }
  39.    }
  40.    public static class StateChanged extends DBusSignal
  41.    {
  42.       public final UInt32 a;
  43.       public StateChanged(String path, UInt32 a) throws DBusException
  44.       {
  45.          super(path, a);
  46.          this.a = a;
  47.       }
  48.    }
  49.    public static class CheckPermissions extends DBusSignal
  50.    {
  51.       public CheckPermissions(String path) throws DBusException
  52.       {
  53.          super(path);
  54.       }
  55.    }
  56.  
  57.   public UInt32 state();
  58.   public void SetLogging(String level, String domains);
  59.   public Map<String,String> GetPermissions();
  60.   public void Enable(boolean enable);
  61.   public void Sleep(boolean sleep);
  62.   public void DeactivateConnection(DBusInterface active_connection);
  63.   public Pair<DBusInterface, DBusInterface> AddAndActivateConnection(Map<String,Map<String,Variant>> connection, DBusInterface device, DBusInterface specific_object);
  64.   public DBusInterface ActivateConnection(DBusInterface connection, DBusInterface device, DBusInterface specific_object);
  65.   public DBusInterface GetDeviceByIpIface(String iface);
  66.   public List<DBusInterface> GetDevices();
  67.  
  68.  
  69.  
  70.   @DBusInterfaceName("org.freedesktop.NetworkManager.IP4Config")
  71.   public interface IP4Config extends DBusInterface {
  72.      
  73.   }
  74.  
  75.  
  76.  //@DBusInterfaceName("org.freedesktop.NetworkManager.AccessPoint")
  77.  public interface AccessPoint extends DBusInterface, DBus.Properties {
  78.  
  79.     //public Map<String,Variant> GetAll(String s);
  80.      
  81.     public static class PropertiesChanged extends DBusSignal {
  82.  
  83.         public Map<String, Variant> properties;
  84.  
  85.         public PropertiesChanged(String path, Map<String, Variant> properties) throws DBusException {
  86.             super(path, properties);
  87.             this.properties = properties;
  88.         }
  89.     }
  90. }
  91.  
  92. @DBusInterfaceName("org.freedesktop.NetworkManager.Device")
  93. public interface Device extends DBusInterface {
  94.  
  95.     public static class StateChanged extends DBusSignal {
  96.  
  97.         public UInt32 newState;
  98.         public UInt32 oldState;
  99.         public UInt32 reason;
  100.  
  101.         public StateChanged(String path, UInt32 newState, UInt32 oldState, UInt32 reason) throws DBusException {
  102.             super(path, newState, oldState, reason);
  103.             this.newState = newState;
  104.             this.oldState = oldState;
  105.             this.reason = reason;
  106.         }
  107.     }
  108.  
  109.     @DBusInterfaceName("org.freedesktop.NetworkManager.Device.Wired")
  110.     public interface Wired extends DBusInterface {
  111.  
  112.         public static class PropertiesChanged extends DBusSignal {
  113.  
  114.             public Map<String, Variant> properties;
  115.  
  116.             public PropertiesChanged(String path, Map<String, Variant> properties) throws DBusException {
  117.                 super(path, properties);
  118.                 this.properties = properties;
  119.             }
  120.         }
  121.     }
  122.  
  123.     @DBusInterfaceName("org.freedesktop.NetworkManager.Device.Wireless")
  124.     public interface Wireless extends DBusInterface {
  125.  
  126.         public List<DBusInterface> GetAccessPoints();
  127.  
  128.         public static class PropertiesChanged extends DBusSignal {
  129.  
  130.             public Map<String, Variant> properties;
  131.  
  132.             public PropertiesChanged(String path, Map<String, Variant> properties) throws DBusException {
  133.                 super(path, properties);
  134.                 this.properties = properties;
  135.             }
  136.         }
  137.  
  138.         public static class AccessPointAdded extends DBusSignal {
  139.  
  140.             public DBusInterface ap;
  141.  
  142.             public AccessPointAdded(String path, DBusInterface ap) throws DBusException {
  143.                 super(path, ap);
  144.                 this.ap = ap;
  145.             }
  146.         }
  147.  
  148.         public static class AccessPointRemoved extends DBusSignal {
  149.  
  150.             public DBusInterface ap;
  151.  
  152.             public AccessPointRemoved(String path, DBusInterface ap) throws DBusException {
  153.                 super(path, ap);
  154.                 this.ap = ap;
  155.             }
  156.         }
  157.     }
  158.  
  159.     @DBusInterfaceName("org.freedesktop.NetworkManager.Device.Cdma")
  160.     public interface CDMA extends DBusInterface {
  161.  
  162.         public static class PropertiesChanged extends DBusSignal {
  163.  
  164.             public Map<String, Variant> properties;
  165.  
  166.             public PropertiesChanged(String path, Map<String, Variant> properties) throws DBusException {
  167.                 super(path, properties);
  168.                 this.properties = properties;
  169.             }
  170.         }
  171.     }
  172.  
  173.     @DBusInterfaceName("org.freedesktop.NetworkManager.Device.Gsm")
  174.     public interface GSM extends DBusInterface {
  175.  
  176.         public static class PropertiesChanged extends DBusSignal {
  177.  
  178.             public Map<String, Variant> properties;
  179.  
  180.             public PropertiesChanged(String path, Map<String, Variant> properties) throws DBusException {
  181.                 super(path, properties);
  182.                 this.properties = properties;
  183.             }
  184.         }
  185.     }
  186.  
  187.     @DBusInterfaceName("org.freedesktop.NetworkManager.Device.Serial")
  188.     public interface Serial extends DBusInterface {
  189.  
  190.         public static class PppStats extends DBusSignal {
  191.  
  192.             public UInt32 rxBytes;
  193.             public UInt32 txBytes;
  194.  
  195.             public PppStats(String path, UInt32 rxBytes, UInt32 txBytes) throws DBusException {
  196.                 super(path, rxBytes, txBytes);
  197.                 this.rxBytes = rxBytes;
  198.                 this.txBytes = txBytes;
  199.             }
  200.         }
  201.     }
  202. }
  203. /*
  204. import java.util.List;
  205. import java.util.Map;
  206. import org.freedesktop.dbus.DBusInterface;
  207. import org.freedesktop.dbus.DBusSignal;
  208. import org.freedesktop.dbus.Variant;
  209. import org.freedesktop.dbus.exceptions.DBusException;*/
  210. public interface Settings extends DBusInterface
  211. {
  212.    public static class NewConnection extends DBusSignal
  213.    {
  214.       public final DBusInterface a;
  215.       public NewConnection(String path, DBusInterface a) throws DBusException
  216.       {
  217.          super(path, a);
  218.          this.a = a;
  219.       }
  220.    }
  221.    public static class PropertiesChanged extends DBusSignal
  222.    {
  223.       public final Map<String,Variant> a;
  224.       public PropertiesChanged(String path, Map<String,Variant> a) throws DBusException
  225.       {
  226.          super(path, a);
  227.          this.a = a;
  228.       }
  229.    }
  230.  
  231.   public void SaveHostname(String hostname);
  232.   public DBusInterface AddConnection(Map<String,Map<String,Variant>> connection);
  233.   public DBusInterface GetConnectionByUuid(String uuid);
  234.   public List<DBusInterface> ListConnections();
  235.  
  236.  
  237.   public interface Connection extends DBusInterface
  238.   {
  239.      public static class Removed extends DBusSignal
  240.      {
  241.         public Removed(String path) throws DBusException
  242.         {
  243.            super(path);
  244.         }
  245.      }
  246.      public static class Updated extends DBusSignal
  247.      {
  248.         public Updated(String path) throws DBusException
  249.         {
  250.            super(path);
  251.         }
  252.      }
  253.  
  254.     public Map<String,Map<String,Variant>> GetSecrets(String setting_name);
  255.     public Map<String,Map<String,Variant>> GetSettings();
  256.     public void Delete();
  257.     public void Update(Map<String,Map<String,Variant>> properties);
  258.  
  259.   }
  260. }
  261.  
  262. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement