MaaFw 4.1.2__py3-none-win_arm64.whl → 4.2.0__py3-none-win_arm64.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 MaaFw might be problematic. Click here for more details.
- maa/agent_client.py +36 -24
- maa/bin/MaaAdbControlUnit.dll +0 -0
- maa/bin/MaaAgentClient.dll +0 -0
- maa/bin/MaaAgentServer.dll +0 -0
- maa/bin/MaaDbgControlUnit.dll +0 -0
- maa/bin/MaaFramework.dll +0 -0
- maa/bin/MaaToolkit.dll +0 -0
- maa/bin/MaaUtils.dll +0 -0
- maa/bin/MaaWin32ControlUnit.dll +0 -0
- maa/resource.py +32 -0
- {maafw-4.1.2.dist-info → maafw-4.2.0.dist-info}/METADATA +1 -1
- {maafw-4.1.2.dist-info → maafw-4.2.0.dist-info}/RECORD +14 -14
- {maafw-4.1.2.dist-info → maafw-4.2.0.dist-info}/WHEEL +0 -0
- {maafw-4.1.2.dist-info → maafw-4.2.0.dist-info}/licenses/LICENSE.md +0 -0
maa/agent_client.py
CHANGED
|
@@ -9,10 +9,17 @@ from .buffer import StringBuffer
|
|
|
9
9
|
class AgentClient:
|
|
10
10
|
_handle: MaaAgentClientHandle
|
|
11
11
|
|
|
12
|
-
def __init__(self):
|
|
12
|
+
def __init__(self, identifier: Optional[str] = None):
|
|
13
13
|
self._set_api_properties()
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
if identifier:
|
|
16
|
+
id_buffer = StringBuffer()
|
|
17
|
+
id_buffer.set(identifier)
|
|
18
|
+
id_buffer_handle = id_buffer._handle
|
|
19
|
+
else:
|
|
20
|
+
id_buffer_handle = None
|
|
21
|
+
|
|
22
|
+
self._handle = Library.agent_client().MaaAgentClientCreateV2(id_buffer_handle)
|
|
16
23
|
if not self._handle:
|
|
17
24
|
raise RuntimeError("Failed to create agent client.")
|
|
18
25
|
|
|
@@ -20,6 +27,15 @@ class AgentClient:
|
|
|
20
27
|
if self._handle:
|
|
21
28
|
Library.agent_client().MaaAgentClientDestroy(self._handle)
|
|
22
29
|
|
|
30
|
+
def identifier(self) -> Optional[str]:
|
|
31
|
+
id_buffer = StringBuffer()
|
|
32
|
+
if not Library.agent_client().MaaAgentClientIdentifier(
|
|
33
|
+
self._handle, id_buffer._handle
|
|
34
|
+
):
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
return id_buffer.get()
|
|
38
|
+
|
|
23
39
|
def bind(self, resource: Resource) -> bool:
|
|
24
40
|
# avoid gc
|
|
25
41
|
self._resource = resource
|
|
@@ -30,26 +46,15 @@ class AgentClient:
|
|
|
30
46
|
)
|
|
31
47
|
)
|
|
32
48
|
|
|
33
|
-
def create_socket(self, identifier: str = "") -> Optional[str]:
|
|
34
|
-
id_buffer = StringBuffer()
|
|
35
|
-
id_buffer.set(identifier)
|
|
36
|
-
|
|
37
|
-
ret = bool(
|
|
38
|
-
Library.agent_client().MaaAgentClientCreateSocket(
|
|
39
|
-
self._handle, id_buffer._handle
|
|
40
|
-
)
|
|
41
|
-
)
|
|
42
|
-
if not ret:
|
|
43
|
-
return None
|
|
44
|
-
|
|
45
|
-
return id_buffer.get()
|
|
46
|
-
|
|
47
49
|
def connect(self) -> bool:
|
|
48
50
|
return bool(Library.agent_client().MaaAgentClientConnect(self._handle))
|
|
49
51
|
|
|
50
52
|
def disconnect(self) -> bool:
|
|
51
53
|
return bool(Library.agent_client().MaaAgentClientDisconnect(self._handle))
|
|
52
54
|
|
|
55
|
+
def connected(self) -> bool:
|
|
56
|
+
return bool(Library.agent_client().MaaAgentClientConnected(self._handle))
|
|
57
|
+
|
|
53
58
|
_api_properties_initialized: bool = False
|
|
54
59
|
|
|
55
60
|
@staticmethod
|
|
@@ -62,8 +67,16 @@ class AgentClient:
|
|
|
62
67
|
|
|
63
68
|
AgentClient._api_properties_initialized = True
|
|
64
69
|
|
|
65
|
-
Library.agent_client().
|
|
66
|
-
Library.agent_client().
|
|
70
|
+
Library.agent_client().MaaAgentClientCreateV2.restype = MaaAgentClientHandle
|
|
71
|
+
Library.agent_client().MaaAgentClientCreateV2.argtypes = [
|
|
72
|
+
MaaStringBufferHandle,
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
Library.agent_client().MaaAgentClientIdentifier.restype = MaaBool
|
|
76
|
+
Library.agent_client().MaaAgentClientIdentifier.argtypes = [
|
|
77
|
+
MaaAgentClientHandle,
|
|
78
|
+
MaaStringBufferHandle,
|
|
79
|
+
]
|
|
67
80
|
|
|
68
81
|
Library.agent_client().MaaAgentClientDestroy.restype = None
|
|
69
82
|
Library.agent_client().MaaAgentClientDestroy.argtypes = [MaaAgentClientHandle]
|
|
@@ -74,12 +87,6 @@ class AgentClient:
|
|
|
74
87
|
MaaResourceHandle,
|
|
75
88
|
]
|
|
76
89
|
|
|
77
|
-
Library.agent_client().MaaAgentClientCreateSocket.restype = MaaBool
|
|
78
|
-
Library.agent_client().MaaAgentClientCreateSocket.argtypes = [
|
|
79
|
-
MaaAgentClientHandle,
|
|
80
|
-
MaaStringBufferHandle,
|
|
81
|
-
]
|
|
82
|
-
|
|
83
90
|
Library.agent_client().MaaAgentClientConnect.restype = MaaBool
|
|
84
91
|
Library.agent_client().MaaAgentClientConnect.argtypes = [
|
|
85
92
|
MaaAgentClientHandle,
|
|
@@ -89,3 +96,8 @@ class AgentClient:
|
|
|
89
96
|
Library.agent_client().MaaAgentClientDisconnect.argtypes = [
|
|
90
97
|
MaaAgentClientHandle,
|
|
91
98
|
]
|
|
99
|
+
|
|
100
|
+
Library.agent_client().MaaAgentClientConnected.restype = MaaBool
|
|
101
|
+
Library.agent_client().MaaAgentClientConnected.argtypes = [
|
|
102
|
+
MaaAgentClientHandle,
|
|
103
|
+
]
|
maa/bin/MaaAdbControlUnit.dll
CHANGED
|
Binary file
|
maa/bin/MaaAgentClient.dll
CHANGED
|
Binary file
|
maa/bin/MaaAgentServer.dll
CHANGED
|
Binary file
|
maa/bin/MaaDbgControlUnit.dll
CHANGED
|
Binary file
|
maa/bin/MaaFramework.dll
CHANGED
|
Binary file
|
maa/bin/MaaToolkit.dll
CHANGED
|
Binary file
|
maa/bin/MaaUtils.dll
CHANGED
|
Binary file
|
maa/bin/MaaWin32ControlUnit.dll
CHANGED
|
Binary file
|
maa/resource.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ctypes
|
|
2
2
|
import pathlib
|
|
3
|
+
import json
|
|
3
4
|
from typing import Any, Optional, Union
|
|
4
5
|
|
|
5
6
|
from .notification_handler import NotificationHandler
|
|
@@ -49,6 +50,24 @@ class Resource:
|
|
|
49
50
|
)
|
|
50
51
|
return Job(resid, self._status, self._wait)
|
|
51
52
|
|
|
53
|
+
def override_pipeline(self, pipeline_override: Dict) -> bool:
|
|
54
|
+
return bool(
|
|
55
|
+
Library.framework().MaaResourceOverridePipeline(
|
|
56
|
+
self._handle,
|
|
57
|
+
json.dumps(pipeline_override, ensure_ascii=False).encode(),
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
def override_next(self, name: str, next_list: List[str]) -> bool:
|
|
62
|
+
list_buffer = StringListBuffer()
|
|
63
|
+
list_buffer.set(next_list)
|
|
64
|
+
|
|
65
|
+
return bool(
|
|
66
|
+
Library.framework().MaaResourceOverrideNext(
|
|
67
|
+
self._handle, name.encode(), list_buffer._handle
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
|
|
52
71
|
@property
|
|
53
72
|
def loaded(self) -> bool:
|
|
54
73
|
return bool(Library.framework().MaaResourceLoaded(self._handle))
|
|
@@ -264,6 +283,19 @@ class Resource:
|
|
|
264
283
|
Library.framework().MaaResourceClear.restype = MaaBool
|
|
265
284
|
Library.framework().MaaResourceClear.argtypes = [MaaResourceHandle]
|
|
266
285
|
|
|
286
|
+
Library.framework().MaaResourceOverridePipeline.restype = MaaBool
|
|
287
|
+
Library.framework().MaaResourceOverridePipeline.argtypes = [
|
|
288
|
+
MaaResourceHandle,
|
|
289
|
+
ctypes.c_char_p,
|
|
290
|
+
]
|
|
291
|
+
|
|
292
|
+
Library.framework().MaaResourceOverrideNext.restype = MaaBool
|
|
293
|
+
Library.framework().MaaResourceOverrideNext.argtypes = [
|
|
294
|
+
MaaResourceHandle,
|
|
295
|
+
ctypes.c_char_p,
|
|
296
|
+
MaaStringBufferHandle,
|
|
297
|
+
]
|
|
298
|
+
|
|
267
299
|
Library.framework().MaaResourceGetHash.restype = MaaBool
|
|
268
300
|
Library.framework().MaaResourceGetHash.argtypes = [
|
|
269
301
|
MaaResourceHandle,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
|
|
2
|
-
maa/agent_client.py,sha256=
|
|
2
|
+
maa/agent_client.py,sha256=_3FDk9YBhqhSL8WzkyPbs5W5y2uLJ5iaosW48N1xWkw,3337
|
|
3
3
|
maa/buffer.py,sha256=XFr1MnWt-xmZkhQ_2ZzGfiqSJJwmphY4U07EEzMNYQc,16544
|
|
4
4
|
maa/context.py,sha256=hOxo7GArAmdBwMGHPqM1I2rtNE5N6WR1QwPOLxZgSvU,5754
|
|
5
5
|
maa/controller.py,sha256=V9ALn24vQX-mWngZbuapBcv-_HNHCtUwHXa3Em2X13s,22517
|
|
@@ -9,24 +9,24 @@ maa/define.py,sha256=qec4GQkYi6AtorJ1ix880Fz67bpZULJOV3VpZEDd2Es,13341
|
|
|
9
9
|
maa/job.py,sha256=MUI5T2X9ON9c7Dl6yo_0pp8Ulpn25XOD_uEdGm2k-TA,1231
|
|
10
10
|
maa/library.py,sha256=9af7ncHUk33N5JcacaAk87JLKkP3atu-J8wf-CvfYhw,3891
|
|
11
11
|
maa/notification_handler.py,sha256=LFJY6YqF9fJSkRsvpmj6ZL5DexMN_cEOj-HmpWpB9o0,5442
|
|
12
|
-
maa/resource.py,sha256=
|
|
12
|
+
maa/resource.py,sha256=gjcYnhaLzR11jM9nd-QfUeVEsBDgJkubOQ3YiMZN5ic,11529
|
|
13
13
|
maa/tasker.py,sha256=cAkYW8Mu5rAgsPlSGacTjJ830sF2yFtvlmXRvIJt-A4,14811
|
|
14
14
|
maa/toolkit.py,sha256=H7P58dPLKzEm_aZMsDJ98IaMZnTE-hcFgK8MKnN0F6g,11381
|
|
15
15
|
maa/agent/__init__.py,sha256=K4vyyD6YgLR6PEQl86t4oKP4eViCdNr3Br94dNk8YjM,257
|
|
16
16
|
maa/agent/agent_server.py,sha256=e0yE_ffWJlTPydJbYLK9OhCM5fVVlZQIcvEQMjB5V68,3636
|
|
17
17
|
maa/bin/DirectML.dll,sha256=nJ5tgiVhxsQbkOaZSz6IV88dZtv7HgxMeZx8ibTpLaE,18527776
|
|
18
|
-
maa/bin/MaaAdbControlUnit.dll,sha256=
|
|
19
|
-
maa/bin/MaaAgentClient.dll,sha256=
|
|
20
|
-
maa/bin/MaaAgentServer.dll,sha256=
|
|
21
|
-
maa/bin/MaaDbgControlUnit.dll,sha256=
|
|
22
|
-
maa/bin/MaaFramework.dll,sha256=
|
|
23
|
-
maa/bin/MaaToolkit.dll,sha256=
|
|
24
|
-
maa/bin/MaaUtils.dll,sha256=
|
|
25
|
-
maa/bin/MaaWin32ControlUnit.dll,sha256=
|
|
18
|
+
maa/bin/MaaAdbControlUnit.dll,sha256=INHQyrrnSBKS58rLFIyN2wxrOo5U2bfjEt9dIj0Exx8,742400
|
|
19
|
+
maa/bin/MaaAgentClient.dll,sha256=aGDfPehYcPtPmD5aPHsBRTfhbSwQJpHGLazDIBSgeh8,963072
|
|
20
|
+
maa/bin/MaaAgentServer.dll,sha256=GMkwgIJ75fDsWnQa3dJLWZfK3V48meYy7veDK7xFVss,1138176
|
|
21
|
+
maa/bin/MaaDbgControlUnit.dll,sha256=XdlLEhkWxFbJOVU6V34Tg_8ZxKuwK537vfydhxVsk_8,399872
|
|
22
|
+
maa/bin/MaaFramework.dll,sha256=9FyQBElZdt1WOsz13JEPIUTKgfozgpv_Bv6j9KddO_U,1535488
|
|
23
|
+
maa/bin/MaaToolkit.dll,sha256=z20pxkCb1DKOVLSn-yF0CrAhJx6aHp74cj4ynoVmLus,720384
|
|
24
|
+
maa/bin/MaaUtils.dll,sha256=ZI3GS8m6KF6vw9CDQKC0M4klPg7VGB0DiIHDdQ3JFac,547840
|
|
25
|
+
maa/bin/MaaWin32ControlUnit.dll,sha256=SHNL5mVQ8lhPLAuhtLOLOfNbFT7tOCpDj2HlJ-bcQaY,335360
|
|
26
26
|
maa/bin/fastdeploy_ppocr_maa.dll,sha256=HowKaHyB31cTK8ZoPAgxlPQOEKUM_jEJoCvyku5hj6k,1168384
|
|
27
27
|
maa/bin/onnxruntime_maa.dll,sha256=rlFVEdC1cB6Yc4EbYuvoyGOr9o941NbLaOzwkaghAVo,19161600
|
|
28
28
|
maa/bin/opencv_world4_maa.dll,sha256=-RoYA6M1PHqnM0Yc-SpKY07rk1mx7PNH6CuxkutS9yw,18250752
|
|
29
|
-
maafw-4.
|
|
30
|
-
maafw-4.
|
|
31
|
-
maafw-4.
|
|
32
|
-
maafw-4.
|
|
29
|
+
maafw-4.2.0.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
|
|
30
|
+
maafw-4.2.0.dist-info/METADATA,sha256=bCdtl_eUewt7RMm48Exp1jtt07LJnjSfmI-HUg2QsOU,21231
|
|
31
|
+
maafw-4.2.0.dist-info/WHEEL,sha256=CUnyDJaykcVTxcKkonAaC86WeSAkytRwcxeIq_huwCo,93
|
|
32
|
+
maafw-4.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|