• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#
3#   Copyright 2016 - The Android Open Source Project
4#
5#   Licensed under the Apache License, Version 2.0 (the "License");
6#   you may not use this file except in compliance with the License.
7#   You may obtain a copy of the License at
8#
9#       http://www.apache.org/licenses/LICENSE-2.0
10#
11#   Unless required by applicable law or agreed to in writing, software
12#   distributed under the License is distributed on an "AS IS" BASIS,
13#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#   See the License for the specific language governing permissions and
15#   limitations under the License.
16
17from acts.dict_object import DictObject
18
19
20class Sl4aEvent(DictObject):
21    """Event returned by sl4a calls to eventPoll() and eventWait()
22
23    The 'name' field uniquely identifies the contents of 'data'.
24
25    """
26
27    def __init__(self, name=None, time=None, data=None):
28        DictObject.__init__(self, name=name, time=time, data=data)
29
30
31class Sl4aNetworkInfo(DictObject):
32    """SL4A equivalent of an Android NetworkInfo Object"""
33
34    def __init__(self,
35                 isAvailable=None,
36                 isConnected=None,
37                 isFailover=None,
38                 isRoaming=None,
39                 ExtraInfo=None,
40                 FailedReason=None,
41                 TypeName=None,
42                 SubtypeName=None,
43                 State=None):
44        DictObject.__init__(
45            self,
46            isAvailable=isAvailable,
47            isConnected=isConnected,
48            isFailover=isFailover,
49            isRoaming=isRoaming,
50            ExtraInfo=ExtraInfo,
51            FailedReason=FailedReason,
52            TypeName=TypeName,
53            SubtypeName=SubtypeName,
54            State=State)
55