All Downloads are FREE. Search and download functionalities are using the official Maven repository.

android.os.INetworkManagementService Maven / Gradle / Ivy

Go to download

provide android hidden api definition ,helper for android super framework development

There is a newer version: 1.11
Show newest version
/*
 * This file is auto-generated.  DO NOT MODIFY.
 */
package android.os;

/**
 * @hide
 */
public interface INetworkManagementService extends android.os.IInterface {
    /**
     * Local-side IPC implementation stub class.
     */
    abstract class Stub extends android.os.Binder implements android.os.INetworkManagementService {
        /**
         * Construct the stub at attach it to the interface.
         */
        public Stub() {
            throw new IllegalStateException("STUB");
        }

        /**
         * Cast an IBinder object into an android.os.INetworkManagementService interface,
         * generating a proxy if needed.
         */
        public static android.os.INetworkManagementService asInterface(android.os.IBinder obj) {
            throw new IllegalStateException("STUB");
        }

        @Override
        public android.os.IBinder asBinder() {
            throw new IllegalStateException("STUB");
        }

        @Override
        public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException {
            throw new IllegalStateException("STUB");
        }


        public static final java.lang.String DESCRIPTOR = "android.os.INetworkManagementService";

    }
    /** * GENERAL */
    /**
     * Register an observer to receive events.
     */
    void registerObserver(android.net.INetworkManagementEventObserver obs) throws android.os.RemoteException;

    /**
     * Unregister an observer from receiving events.
     */

    void unregisterObserver(android.net.INetworkManagementEventObserver obs) throws android.os.RemoteException;

    /**
     * Returns a list of currently known network interfaces
     */
    java.lang.String[] listInterfaces() throws android.os.RemoteException;

    /**
     * Retrieves the specified interface config
     */
    android.net.InterfaceConfiguration getInterfaceConfig(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Sets the configuration of the specified interface
     */
    void setInterfaceConfig(java.lang.String iface, android.net.InterfaceConfiguration cfg) throws android.os.RemoteException;

    /**
     * Clear all IP addresses on the specified interface
     */
    void clearInterfaceAddresses(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Set interface down
     */
    void setInterfaceDown(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Set interface up
     */
    void setInterfaceUp(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Set interface IPv6 privacy extensions
     */
    void setInterfaceIpv6PrivacyExtensions(java.lang.String iface, boolean enable) throws android.os.RemoteException;

    /**
     * Disable IPv6 on an interface
     */
    void disableIpv6(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Enable IPv6 on an interface
     */
    void enableIpv6(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Set IPv6 autoconf address generation mode.
     * This is a no-op if an unsupported mode is requested.
     */
    void setIPv6AddrGenMode(java.lang.String iface, int mode) throws android.os.RemoteException;

    /**
     * Add the specified route to the interface.
     */
    void addRoute(int netId, android.net.RouteInfo route) throws android.os.RemoteException;

    /**
     * Remove the specified route from the interface.
     */
    void removeRoute(int netId, android.net.RouteInfo route) throws android.os.RemoteException;

    /**
     * Shuts down the service
     */
    void shutdown() throws android.os.RemoteException;
    /** * TETHERING RELATED */
    /**
     * Returns true if IP forwarding is enabled
     */
    boolean getIpForwardingEnabled() throws android.os.RemoteException;

    /**
     * Enables/Disables IP Forwarding
     */
    void setIpForwardingEnabled(boolean enabled) throws android.os.RemoteException;

    /**
     * Start tethering services with the specified dhcp server range
     * arg is a set of start end pairs defining the ranges.
     */
    void startTethering(java.lang.String[] dhcpRanges) throws android.os.RemoteException;

    /**
     * Start tethering services with the specified dhcp server range and
     * DNS proxy config.
     * {@code boolean} is used to control legacy DNS proxy server.
     * {@code String[]} is a set of start end pairs defining the ranges.
     */
    void startTetheringWithConfiguration(boolean usingLegacyDnsProxy, java.lang.String[] dhcpRanges) throws android.os.RemoteException;

    /**
     * Stop currently running tethering services
     */
    void stopTethering() throws android.os.RemoteException;

    /**
     * Returns true if tethering services are started
     */
    boolean isTetheringStarted() throws android.os.RemoteException;

    /**
     * Tethers the specified interface
     */
    void tetherInterface(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Untethers the specified interface
     */
    void untetherInterface(java.lang.String iface) throws android.os.RemoteException;

    /**
     * Returns a list of currently tethered interfaces
     */
    java.lang.String[] listTetheredInterfaces() throws android.os.RemoteException;

    /**
     * Returns the list of DNS forwarders (in order of priority)
     */
    java.lang.String[] getDnsForwarders() throws android.os.RemoteException;

    /**
     * Enables unidirectional packet forwarding from {@code fromIface} to
     * {@code toIface}.
     */
    void startInterfaceForwarding(java.lang.String fromIface, java.lang.String toIface) throws android.os.RemoteException;

    /**
     * Disables unidirectional packet forwarding from {@code fromIface} to
     * {@code toIface}.
     */
    void stopInterfaceForwarding(java.lang.String fromIface, java.lang.String toIface) throws android.os.RemoteException;

    /**
     * Enables Network Address Translation between two interfaces.
     * The address and netmask of the external interface is used for
     * the NAT'ed network.
     */
    void enableNat(java.lang.String internalInterface, java.lang.String externalInterface) throws android.os.RemoteException;

    /**
     * Disables Network Address Translation between two interfaces.
     */
    void disableNat(java.lang.String internalInterface, java.lang.String externalInterface) throws android.os.RemoteException;

    /**
     * Registers a {@code ITetheringStatsProvider} to provide tethering statistics.
     * All registered providers will be called in order, and their results will be added together.
     * Netd is always registered as a tethering stats provider.
     */
    void registerTetheringStatsProvider(android.net.ITetheringStatsProvider provider, java.lang.String name) throws android.os.RemoteException;

    /**
     * Unregisters a previously-registered {@code ITetheringStatsProvider}.
     */
    void unregisterTetheringStatsProvider(android.net.ITetheringStatsProvider provider) throws android.os.RemoteException;

    /**
     * Reports that a tethering provider has reached a data limit.
     * 

* Currently triggers a global alert, which causes NetworkStatsService to poll counters and * re-evaluate data usage. *

* This does not take an interface name because: * 1. The tethering offload stats provider cannot reliably determine the interface on which the * limit was reached, because the HAL does not provide it. * 2. Firing an interface-specific alert instead of a global alert isn't really useful since in * all cases of interest, the system responds to both in the same way - it polls stats, and * then notifies NetworkPolicyManagerService of the fact. */ void tetherLimitReached(android.net.ITetheringStatsProvider provider) throws android.os.RemoteException; /** * DATA USAGE RELATED */ /** * Return summary of network statistics all tethering interfaces. */ android.net.NetworkStats getNetworkStatsTethering(int how) throws android.os.RemoteException; /** * Set quota for an interface. */ void setInterfaceQuota(java.lang.String iface, long quotaBytes) throws android.os.RemoteException; /** * Remove quota for an interface. */ void removeInterfaceQuota(java.lang.String iface) throws android.os.RemoteException; /** * Set alert for an interface; requires that iface already has quota. */ void setInterfaceAlert(java.lang.String iface, long alertBytes) throws android.os.RemoteException; /** * Remove alert for an interface. */ void removeInterfaceAlert(java.lang.String iface) throws android.os.RemoteException; /** * Set alert across all interfaces. */ void setGlobalAlert(long alertBytes) throws android.os.RemoteException; /** * Control network activity of a UID over interfaces with a quota limit. */ void setUidOnMeteredNetworkDenylist(int uid, boolean enable) throws android.os.RemoteException; void setUidOnMeteredNetworkAllowlist(int uid, boolean enable) throws android.os.RemoteException; boolean setDataSaverModeEnabled(boolean enable) throws android.os.RemoteException; void setUidCleartextNetworkPolicy(int uid, int policy) throws android.os.RemoteException; /** * Return status of bandwidth control module. */ boolean isBandwidthControlEnabled() throws android.os.RemoteException; void setFirewallEnabled(boolean enabled) throws android.os.RemoteException; boolean isFirewallEnabled() throws android.os.RemoteException; void setFirewallInterfaceRule(java.lang.String iface, boolean allow) throws android.os.RemoteException; void setFirewallUidRule(int chain, int uid, int rule) throws android.os.RemoteException; void setFirewallUidRules(int chain, int[] uids, int[] rules) throws android.os.RemoteException; void setFirewallChainEnabled(int chain, boolean enable) throws android.os.RemoteException; /** * Allow UID to call protect(). */ void allowProtect(int uid) throws android.os.RemoteException; /** * Deny UID from calling protect(). */ void denyProtect(int uid) throws android.os.RemoteException; void addInterfaceToLocalNetwork(java.lang.String iface, java.util.List routes) throws android.os.RemoteException; void removeInterfaceFromLocalNetwork(java.lang.String iface) throws android.os.RemoteException; int removeRoutesFromLocalNetwork(java.util.List routes) throws android.os.RemoteException; boolean isNetworkRestricted(int uid) throws android.os.RemoteException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy