replicant-frameworks_native/vpn/java/android/net/vpn/VpnState.java
Hung-ying Tyan 173be90a18 Add the VPN services package, VPN service base classes and L2tpIpsecService.
Also add android.security.Keystore. This is a quick solution. Will be
evolved to a more mature implementation.

PATCH SET 2:
+ Add VpnServiceBinder to hide VpnService and its subclasses.
+ Add sendCommand2() to AndroidServiceProxy to work with the latest mtpd.

PATCH SET 3:
+ Rebase to catch up with new commits; no changes made.

PATCH SET 4:
+ Remove/comment out @Override on interface methods to be compilable for Java 1.5.

PATCH SET 5:
+ Add L2tpService.java.
+ Make VpnService to work on SingleServerProfile; add serverIp to
  connect(); set system property "net.vpn.server_ip"; and move
  getPppOptionFilePath() from L2tpIpsecService to VpnService
+ Revise VpnManager to start VpnService without worrying about which
  type (as the type info is in VpnProfile)
+ Remove installation stuff from VpnManager

PATCH SET 6:
+ Fix PATCH SET 5 (the patch was messed up). Please ignore PATCH SET 5.

PATCH SET 7:
+ Fix styles.

PATCH SET 8:
+ Add CANCELLED to VpnState.

PATCH SET 9:
+ Make VpnProfile serializable (in order to save them to persistent storage)

PATCH SET 10:
+ Remove Keystore.java as it's added in another CL.
2009-06-12 15:45:56 +08:00

34 lines
1.2 KiB
Java

/*
* Copyright (C) 2007, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.net.vpn;
/**
* Enumeration of all VPN states.
*
* A normal VPN connection lifetime starts in {@link IDLE}. When a new
* connection is about to be set up, it goes to {@link CONNECTING} and then
* {@link CONNECTED} if successful; back to {@link IDLE} if failed.
* When the connection is about to be torn down, it goes to
* {@link DISCONNECTING} and then {@link IDLE}.
* {@link CANCELLED} is a state when a VPN connection attempt is aborted, and
* is in transition to {@link IDLE}.
* {@hide}
*/
public enum VpnState {
CONNECTING, DISCONNECTING, CANCELLED, CONNECTED, IDLE
}