Home | History | Annotate | Download | only in facade
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.googlecode.android_scripting.facade;
     18 
     19 /**
     20  * Constants to be used in the facade for ConnectivityManager/Service.
     21  */
     22 public class ConnectivityConstants {
     23     /**
     24      * Network callback master event name
     25      */
     26     public static final String EventNetworkCallback = "NetworkCallback";
     27 
     28     /**
     29      * Connectivity events - sub-names
     30      */
     31     public static final String NetworkCallbackPreCheck = "PreCheck";
     32     public static final String NetworkCallbackAvailable = "Available";
     33     public static final String NetworkCallbackLosing = "Losing";
     34     public static final String NetworkCallbackLost = "Lost";
     35     public static final String NetworkCallbackUnavailable = "Unavailable";
     36     public static final String NetworkCallbackCapabilitiesChanged = "CapabilitiesChanged";
     37     public static final String NetworkCallbackSuspended = "Suspended";
     38     public static final String NetworkCallbackResumed = "Resumed";
     39     public static final String NetworkCallbackLinkPropertiesChanged = "LinkPropertiesChanged";
     40     public static final String NetworkCallbackInvalid = "Invalid";
     41 
     42     /**
     43      * Connectivity changed event
     44      */
     45     public static final String EventConnectivityChanged = "ConnectivityChanged";
     46 
     47     /**
     48      * Packet keep-alive event
     49      */
     50     public static final String EventPacketKeepaliveCallback = "PacketKeepaliveCallback";
     51 
     52     /**
     53      * Packet keep-alive - sub-names
     54      */
     55     public static final String PacketKeepaliveCallbackStarted = "Started";
     56     public static final String PacketKeepaliveCallbackStopped = "Stopped";
     57     public static final String PacketKeepaliveCallbackError = "Error";
     58     public static final String PacketKeepaliveCallbackInvalid = "Invalid";
     59 
     60     /**
     61      * Constants for PacketKeepaliveEvent.
     62      */
     63     public static class PacketKeepaliveContainer {
     64         public static final String ID = "id";
     65         public static final String PACKET_KEEPALIVE_EVENT = "packetKeepaliveEvent";
     66     }
     67 
     68     /**
     69      * Constants for NetworkCallbackEvent.
     70      */
     71     public static class NetworkCallbackContainer {
     72         public static final String ID = "id";
     73         public static final String NETWORK_CALLBACK_EVENT = "networkCallbackEvent";
     74         public static final String MAX_MS_TO_LIVE = "maxMsToLive";
     75         public static final String RSSI = "rssi";
     76     }
     77 
     78     /**
     79      * Constants for OnStartTetheringCallback
     80      */
     81     public static final String TetheringStartedCallback = "ConnectivityManagerOnTetheringStarted";
     82     public static final String TetheringFailedCallback = "ConnectivityManagerOnTetheringFailed";
     83 }
     84