flet-geolocator 0.2.0.dev504__py3-none-any.whl → 0.70.0.dev6293__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flet-geolocator might be problematic. Click here for more details.
- flet_geolocator/geolocator.py +12 -65
- {flet_geolocator-0.2.0.dev504.dist-info → flet_geolocator-0.70.0.dev6293.dist-info}/METADATA +13 -23
- flet_geolocator-0.70.0.dev6293.dist-info/RECORD +14 -0
- flutter/flet_geolocator/pubspec.yaml +9 -9
- flet_geolocator-0.2.0.dev504.dist-info/RECORD +0 -18
- flutter/flet_geolocator/CHANGELOG.md +0 -3
- flutter/flet_geolocator/LICENSE +0 -201
- flutter/flet_geolocator/README.md +0 -3
- flutter/flet_geolocator/pubspec.lock +0 -896
- {flet_geolocator-0.2.0.dev504.dist-info → flet_geolocator-0.70.0.dev6293.dist-info}/WHEEL +0 -0
- {flet_geolocator-0.2.0.dev504.dist-info → flet_geolocator-0.70.0.dev6293.dist-info}/licenses/LICENSE +0 -0
- {flet_geolocator-0.2.0.dev504.dist-info → flet_geolocator-0.70.0.dev6293.dist-info}/top_level.txt +0 -0
flet_geolocator/geolocator.py
CHANGED
|
@@ -2,7 +2,6 @@ from dataclasses import field
|
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
4
|
import flet as ft
|
|
5
|
-
|
|
6
5
|
from flet_geolocator.types import (
|
|
7
6
|
GeolocatorConfiguration,
|
|
8
7
|
GeolocatorPermissionStatus,
|
|
@@ -17,9 +16,6 @@ __all__ = ["Geolocator"]
|
|
|
17
16
|
class Geolocator(ft.Service):
|
|
18
17
|
"""
|
|
19
18
|
A control that allows you to fetch GPS data from your device.
|
|
20
|
-
|
|
21
|
-
This control is non-visual and should be added to
|
|
22
|
-
[`Page.overlay`][flet.] list.
|
|
23
19
|
"""
|
|
24
20
|
|
|
25
21
|
configuration: Optional[GeolocatorConfiguration] = None
|
|
@@ -52,7 +48,6 @@ class Geolocator(ft.Service):
|
|
|
52
48
|
async def get_current_position(
|
|
53
49
|
self,
|
|
54
50
|
configuration: Optional[GeolocatorConfiguration] = None,
|
|
55
|
-
timeout: float = 30,
|
|
56
51
|
) -> GeolocatorPosition:
|
|
57
52
|
"""
|
|
58
53
|
Gets the current position of the device with the desired accuracy and settings.
|
|
@@ -68,146 +63,104 @@ class Geolocator(ft.Service):
|
|
|
68
63
|
configuration: Additional configuration for the location request.
|
|
69
64
|
If not specified, then the [`Geolocator.configuration`][(p).]
|
|
70
65
|
property is used.
|
|
71
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
72
66
|
|
|
73
67
|
Returns:
|
|
74
68
|
The current position of the device as a [`GeolocatorPosition`][(p).].
|
|
75
|
-
|
|
76
|
-
Raises:
|
|
77
|
-
TimeoutError: If the request times out.
|
|
78
69
|
"""
|
|
79
70
|
r = await self._invoke_method(
|
|
80
71
|
method_name="get_current_position",
|
|
81
72
|
arguments={"configuration": configuration or self.configuration},
|
|
82
|
-
timeout=timeout,
|
|
83
73
|
)
|
|
84
74
|
return GeolocatorPosition(**r)
|
|
85
75
|
|
|
86
|
-
async def get_last_known_position(self
|
|
76
|
+
async def get_last_known_position(self) -> GeolocatorPosition:
|
|
87
77
|
"""
|
|
88
78
|
Gets the last known position stored on the user's device.
|
|
89
79
|
The accuracy can be defined using the
|
|
90
80
|
[`Geolocator.configuration`][(p).] property.
|
|
91
81
|
|
|
92
82
|
Note:
|
|
93
|
-
This method is not supported on web
|
|
94
|
-
|
|
95
|
-
Args:
|
|
96
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
83
|
+
This method is not supported on web platform.
|
|
97
84
|
|
|
98
85
|
Returns:
|
|
99
86
|
The last known position of the device as a [`GeolocatorPosition`][(p).].
|
|
100
87
|
|
|
101
88
|
Raises:
|
|
102
89
|
AssertionError: If invoked on a web platform.
|
|
103
|
-
TimeoutError: If the request times out.
|
|
104
90
|
"""
|
|
105
91
|
assert not self.page.web, "get_last_known_position is not supported on web"
|
|
106
92
|
r = await self._invoke_method(
|
|
107
93
|
"get_last_known_position",
|
|
108
|
-
timeout=timeout,
|
|
109
94
|
)
|
|
110
95
|
return GeolocatorPosition(**r)
|
|
111
96
|
|
|
112
|
-
async def get_permission_status(
|
|
113
|
-
self, timeout: float = 10
|
|
114
|
-
) -> GeolocatorPermissionStatus:
|
|
97
|
+
async def get_permission_status(self) -> GeolocatorPermissionStatus:
|
|
115
98
|
"""
|
|
116
99
|
Gets which permission the app has been granted to access the device's location.
|
|
117
100
|
|
|
118
|
-
Args:
|
|
119
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
120
|
-
|
|
121
101
|
Returns:
|
|
122
102
|
The status of the permission.
|
|
123
|
-
|
|
124
|
-
Raises:
|
|
125
|
-
TimeoutError: If the request times out.
|
|
126
103
|
"""
|
|
127
104
|
r = await self._invoke_method(
|
|
128
105
|
"get_permission_status",
|
|
129
|
-
timeout=timeout,
|
|
130
106
|
)
|
|
131
107
|
return GeolocatorPermissionStatus(r)
|
|
132
108
|
|
|
133
|
-
async def request_permission(self
|
|
109
|
+
async def request_permission(self) -> GeolocatorPermissionStatus:
|
|
134
110
|
"""
|
|
135
111
|
Requests the device for access to the device's location.
|
|
136
112
|
|
|
137
|
-
Args:
|
|
138
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
139
|
-
|
|
140
113
|
Returns:
|
|
141
114
|
The status of the permission request.
|
|
142
|
-
|
|
143
|
-
Raises:
|
|
144
|
-
TimeoutError: If the request times out.
|
|
145
115
|
"""
|
|
146
116
|
r = await self._invoke_method(
|
|
147
117
|
"request_permission",
|
|
148
|
-
timeout=timeout,
|
|
149
118
|
)
|
|
150
119
|
return GeolocatorPermissionStatus(r)
|
|
151
120
|
|
|
152
|
-
async def is_location_service_enabled(self
|
|
121
|
+
async def is_location_service_enabled(self) -> bool:
|
|
153
122
|
"""
|
|
154
123
|
Checks if location service is enabled.
|
|
155
124
|
|
|
156
|
-
Args:
|
|
157
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
158
|
-
|
|
159
125
|
Returns:
|
|
160
126
|
`True` if location service is enabled, `False` otherwise.
|
|
161
|
-
|
|
162
|
-
Raises:
|
|
163
|
-
TimeoutError: If the request times out.
|
|
164
127
|
"""
|
|
165
|
-
return await self._invoke_method("is_location_service_enabled"
|
|
128
|
+
return await self._invoke_method("is_location_service_enabled")
|
|
166
129
|
|
|
167
|
-
async def open_app_settings(self
|
|
130
|
+
async def open_app_settings(self) -> bool:
|
|
168
131
|
"""
|
|
169
132
|
Attempts to open the app's settings.
|
|
170
133
|
|
|
171
134
|
Note:
|
|
172
|
-
This method is not supported on web
|
|
173
|
-
|
|
174
|
-
Args:
|
|
175
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
135
|
+
This method is not supported on web platform.
|
|
176
136
|
|
|
177
137
|
Returns:
|
|
178
138
|
`True` if the app's settings were opened successfully, `False` otherwise.
|
|
179
139
|
|
|
180
140
|
Raises:
|
|
181
141
|
AssertionError: If invoked on a web platform.
|
|
182
|
-
TimeoutError: If the request times out.
|
|
183
142
|
"""
|
|
184
143
|
assert not self.page.web, "open_app_settings is not supported on web"
|
|
185
144
|
return await self._invoke_method(
|
|
186
145
|
"open_app_settings",
|
|
187
|
-
timeout=timeout,
|
|
188
146
|
)
|
|
189
147
|
|
|
190
|
-
async def open_location_settings(self
|
|
148
|
+
async def open_location_settings(self) -> bool:
|
|
191
149
|
"""
|
|
192
150
|
Attempts to open the device's location settings.
|
|
193
151
|
|
|
194
152
|
Note:
|
|
195
|
-
This method is not supported on web
|
|
196
|
-
|
|
197
|
-
Args:
|
|
198
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
153
|
+
This method is not supported on web platform.
|
|
199
154
|
|
|
200
155
|
Returns:
|
|
201
156
|
`True` if the device's settings were opened successfully, `False` otherwise.
|
|
202
157
|
|
|
203
158
|
Raises:
|
|
204
159
|
AssertionError: If invoked on a web platform.
|
|
205
|
-
TimeoutError: If the request times out.
|
|
206
160
|
"""
|
|
207
161
|
assert not self.page.web, "open_location_settings is not supported on web"
|
|
208
162
|
return await self._invoke_method(
|
|
209
163
|
"open_location_settings",
|
|
210
|
-
timeout=timeout,
|
|
211
164
|
)
|
|
212
165
|
|
|
213
166
|
async def distance_between(
|
|
@@ -216,8 +169,7 @@ class Geolocator(ft.Service):
|
|
|
216
169
|
start_longitude: ft.Number,
|
|
217
170
|
end_latitude: ft.Number,
|
|
218
171
|
end_longitude: ft.Number,
|
|
219
|
-
|
|
220
|
-
):
|
|
172
|
+
) -> ft.Number:
|
|
221
173
|
"""
|
|
222
174
|
Calculates the distance between the supplied coordinates in meters.
|
|
223
175
|
|
|
@@ -229,15 +181,11 @@ class Geolocator(ft.Service):
|
|
|
229
181
|
start_longitude: The longitude of the starting point, in degrees.
|
|
230
182
|
end_latitude: The latitude of the ending point, in degrees.
|
|
231
183
|
end_longitude: The longitude of the ending point, in degrees.
|
|
232
|
-
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
233
184
|
|
|
234
185
|
Returns:
|
|
235
186
|
The distance between the coordinates in meters.
|
|
236
|
-
|
|
237
|
-
Raises:
|
|
238
|
-
TimeoutError: If the request times out.
|
|
239
187
|
"""
|
|
240
|
-
await self._invoke_method(
|
|
188
|
+
return await self._invoke_method(
|
|
241
189
|
method_name="distance_between",
|
|
242
190
|
arguments={
|
|
243
191
|
"start_latitude": start_latitude,
|
|
@@ -245,5 +193,4 @@ class Geolocator(ft.Service):
|
|
|
245
193
|
"end_latitude": end_latitude,
|
|
246
194
|
"end_longitude": end_longitude,
|
|
247
195
|
},
|
|
248
|
-
timeout=timeout,
|
|
249
196
|
)
|
{flet_geolocator-0.2.0.dev504.dist-info → flet_geolocator-0.70.0.dev6293.dist-info}/METADATA
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flet-geolocator
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.70.0.dev6293
|
|
4
4
|
Summary: Adds geolocation capabilities to your Flet apps.
|
|
5
5
|
Author-email: Flet contributors <hello@flet.dev>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://flet.dev
|
|
8
|
-
Project-URL: Documentation, https://flet
|
|
9
|
-
Project-URL: Repository, https://github.com/flet-dev/flet-geolocator
|
|
10
|
-
Project-URL: Issues, https://github.com/flet-dev/flet
|
|
8
|
+
Project-URL: Documentation, https://docs.flet.dev/geolocator
|
|
9
|
+
Project-URL: Repository, https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-geolocator
|
|
10
|
+
Project-URL: Issues, https://github.com/flet-dev/flet/issues
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: flet
|
|
14
|
+
Requires-Dist: flet==0.70.0.dev6293
|
|
15
15
|
Dynamic: license-file
|
|
16
16
|
|
|
17
17
|
# flet-geolocator
|
|
18
18
|
|
|
19
19
|
[](https://pypi.python.org/pypi/flet-geolocator)
|
|
20
20
|
[](https://pepy.tech/project/flet-geolocator)
|
|
21
|
-
[](https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet-geolocator/LICENSE)
|
|
22
22
|
|
|
23
23
|
Adds geolocation capabilities to your [Flet](https://flet.dev) apps.
|
|
24
24
|
|
|
@@ -30,22 +30,17 @@ Features include:
|
|
|
30
30
|
|
|
31
31
|
It is based on the [geolocator](https://pub.dev/packages/geolocator) Flutter package.
|
|
32
32
|
|
|
33
|
+
> **Important:** Add the `Geolocator` instance to `page.services` before invoking its methods.
|
|
34
|
+
|
|
33
35
|
## Documentation
|
|
34
36
|
|
|
35
|
-
Detailed documentation to this package can be found [here](https://flet
|
|
37
|
+
Detailed documentation to this package can be found [here](https://docs.flet.dev/geolocator/).
|
|
36
38
|
|
|
37
39
|
## Platform Support
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|----------|:---------:|
|
|
43
|
-
| Windows | ✅ |
|
|
44
|
-
| macOS | ✅ |
|
|
45
|
-
| Linux | ✅ |
|
|
46
|
-
| iOS | ✅ |
|
|
47
|
-
| Android | ✅ |
|
|
48
|
-
| Web | ✅ |
|
|
41
|
+
| Platform | Windows | macOS | Linux | iOS | Android | Web |
|
|
42
|
+
|----------|---------|-------|-------|-----|---------|-----|
|
|
43
|
+
| Supported| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
49
44
|
|
|
50
45
|
## Usage
|
|
51
46
|
|
|
@@ -64,11 +59,6 @@ To install the `flet-geolocator` package and add it to your project dependencies
|
|
|
64
59
|
```
|
|
65
60
|
After this, you will have to manually add this package to your `requirements.txt` or `pyproject.toml`.
|
|
66
61
|
|
|
67
|
-
- Using `poetry`:
|
|
68
|
-
```bash
|
|
69
|
-
poetry add flet-geolocator
|
|
70
|
-
```
|
|
71
|
-
|
|
72
62
|
### Examples
|
|
73
63
|
|
|
74
|
-
For examples, see [these](
|
|
64
|
+
For examples, see [these](https://github.com/flet-dev/flet/tree/main/examples/controls/geolocator).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
flet_geolocator/__init__.py,sha256=2oT0PnZGnjufBoTZK-3WDyYJJnZExT7OnJ-F1Qqoenw,789
|
|
2
|
+
flet_geolocator/geolocator.py,sha256=St09cxENAKPBqwi8iWlxIvtSdRzfX8YBYODbG1wgTi8,6308
|
|
3
|
+
flet_geolocator/types.py,sha256=E_68vz7BEv_PWDk1j0DAoWDOfax-XBJ9J2Ije2cOktg,13028
|
|
4
|
+
flet_geolocator-0.70.0.dev6293.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
+
flutter/flet_geolocator/analysis_options.yaml,sha256=32kjGAc-zF87inWaH5M46yGZWQDTwrwfvNLHeAocfG4,154
|
|
6
|
+
flutter/flet_geolocator/pubspec.yaml,sha256=-AODCVZe7N6b0OHJ4S64U1AY23h9kp8fuhR9El_jsCU,368
|
|
7
|
+
flutter/flet_geolocator/lib/flet_geolocator.dart,sha256=f5rUWcdvXkySvVjv50N-m0neLWB3P2okmEWxGg9r9Vk,70
|
|
8
|
+
flutter/flet_geolocator/lib/src/extension.dart,sha256=x8zm0Pt3ZsyTj7q8MImtLTIK_kCAoaqYaJ41NWPug-8,314
|
|
9
|
+
flutter/flet_geolocator/lib/src/geolocator.dart,sha256=GiN-E11OqatsYDIOwIgscrBhK9OPcHduttnuED6cqHs,3275
|
|
10
|
+
flutter/flet_geolocator/lib/src/utils/geolocator.dart,sha256=BZxf9l1CIvuNEnZMVONUxAnGVSXl2XY1zihP1gH6qdo,3999
|
|
11
|
+
flet_geolocator-0.70.0.dev6293.dist-info/METADATA,sha256=dFq2C3oF5QKXj6B2qTgmfybcThZWyc4sFznqW4PgasI,2243
|
|
12
|
+
flet_geolocator-0.70.0.dev6293.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
flet_geolocator-0.70.0.dev6293.dist-info/top_level.txt,sha256=MuAs94VDBb5Btg9cvN83W2sHm_YslMQ2JOKZhqm88cs,24
|
|
14
|
+
flet_geolocator-0.70.0.dev6293.dist-info/RECORD,,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
name: flet_geolocator
|
|
2
2
|
description: Flet Geolocator control
|
|
3
|
-
|
|
4
|
-
repository: https://github.com/flet-dev/flet-geolocator/src/flutter/flet_geolocator
|
|
5
|
-
version: 0.2.0
|
|
3
|
+
version: 0.1.0
|
|
6
4
|
publish_to: none
|
|
5
|
+
|
|
7
6
|
environment:
|
|
8
7
|
sdk: '>=3.2.3 <4.0.0'
|
|
9
|
-
flutter:
|
|
8
|
+
flutter: ">=1.17.0"
|
|
9
|
+
|
|
10
10
|
dependencies:
|
|
11
11
|
flutter:
|
|
12
12
|
sdk: flutter
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
geolocator: 14.0.2
|
|
14
15
|
collection: ^1.16.0
|
|
16
|
+
|
|
15
17
|
flet:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
path: packages/flet
|
|
19
|
-
ref: main
|
|
18
|
+
path: ../../../../../../../packages/flet
|
|
19
|
+
|
|
20
20
|
dev_dependencies:
|
|
21
21
|
flutter_test:
|
|
22
22
|
sdk: flutter
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
flet_geolocator/__init__.py,sha256=2oT0PnZGnjufBoTZK-3WDyYJJnZExT7OnJ-F1Qqoenw,789
|
|
2
|
-
flet_geolocator/geolocator.py,sha256=tgNfnEdM6OHnHaqylsESUFmY9Whde_461Dy4ijrirN4,8062
|
|
3
|
-
flet_geolocator/types.py,sha256=E_68vz7BEv_PWDk1j0DAoWDOfax-XBJ9J2Ije2cOktg,13028
|
|
4
|
-
flet_geolocator-0.2.0.dev504.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
-
flutter/flet_geolocator/CHANGELOG.md,sha256=66sWepPaeTc9_lzcYIGU55AlxSU5Z1XVtknXpzd_-p8,40
|
|
6
|
-
flutter/flet_geolocator/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
7
|
-
flutter/flet_geolocator/README.md,sha256=sYHQP6tUk1CzbWAaqucJStoRvAsgp36IqjaIVoXCiF4,70
|
|
8
|
-
flutter/flet_geolocator/analysis_options.yaml,sha256=32kjGAc-zF87inWaH5M46yGZWQDTwrwfvNLHeAocfG4,154
|
|
9
|
-
flutter/flet_geolocator/pubspec.lock,sha256=FaMHKOMmkfDAhKEAk3AaKaFzaQYmU6kjAfI6kocBuuk,26646
|
|
10
|
-
flutter/flet_geolocator/pubspec.yaml,sha256=de-hyLxpdTX-naxnyd4D6cUAZW82jxodApSjQ0hFdWk,529
|
|
11
|
-
flutter/flet_geolocator/lib/flet_geolocator.dart,sha256=f5rUWcdvXkySvVjv50N-m0neLWB3P2okmEWxGg9r9Vk,70
|
|
12
|
-
flutter/flet_geolocator/lib/src/extension.dart,sha256=x8zm0Pt3ZsyTj7q8MImtLTIK_kCAoaqYaJ41NWPug-8,314
|
|
13
|
-
flutter/flet_geolocator/lib/src/geolocator.dart,sha256=GiN-E11OqatsYDIOwIgscrBhK9OPcHduttnuED6cqHs,3275
|
|
14
|
-
flutter/flet_geolocator/lib/src/utils/geolocator.dart,sha256=BZxf9l1CIvuNEnZMVONUxAnGVSXl2XY1zihP1gH6qdo,3999
|
|
15
|
-
flet_geolocator-0.2.0.dev504.dist-info/METADATA,sha256=hD29AhHInBwOD3IdiViftTt78zzNp7GuGPR1nTrqqb4,2193
|
|
16
|
-
flet_geolocator-0.2.0.dev504.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
-
flet_geolocator-0.2.0.dev504.dist-info/top_level.txt,sha256=MuAs94VDBb5Btg9cvN83W2sHm_YslMQ2JOKZhqm88cs,24
|
|
18
|
-
flet_geolocator-0.2.0.dev504.dist-info/RECORD,,
|
flutter/flet_geolocator/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|