MaaFw 4.2.0b1__py3-none-manylinux2014_aarch64.whl → 4.2.1__py3-none-manylinux2014_aarch64.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 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
- self._handle = Library.agent_client().MaaAgentClientCreate()
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,16 @@ class AgentClient:
20
27
  if self._handle:
21
28
  Library.agent_client().MaaAgentClientDestroy(self._handle)
22
29
 
30
+ @property
31
+ def identifier(self) -> Optional[str]:
32
+ id_buffer = StringBuffer()
33
+ if not Library.agent_client().MaaAgentClientIdentifier(
34
+ self._handle, id_buffer._handle
35
+ ):
36
+ return None
37
+
38
+ return id_buffer.get()
39
+
23
40
  def bind(self, resource: Resource) -> bool:
24
41
  # avoid gc
25
42
  self._resource = resource
@@ -30,26 +47,16 @@ class AgentClient:
30
47
  )
31
48
  )
32
49
 
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
50
  def connect(self) -> bool:
48
51
  return bool(Library.agent_client().MaaAgentClientConnect(self._handle))
49
52
 
50
53
  def disconnect(self) -> bool:
51
54
  return bool(Library.agent_client().MaaAgentClientDisconnect(self._handle))
52
55
 
56
+ @property
57
+ def connected(self) -> bool:
58
+ return bool(Library.agent_client().MaaAgentClientConnected(self._handle))
59
+
53
60
  _api_properties_initialized: bool = False
54
61
 
55
62
  @staticmethod
@@ -62,8 +69,16 @@ class AgentClient:
62
69
 
63
70
  AgentClient._api_properties_initialized = True
64
71
 
65
- Library.agent_client().MaaAgentClientCreate.restype = MaaAgentClientHandle
66
- Library.agent_client().MaaAgentClientCreate.argtypes = []
72
+ Library.agent_client().MaaAgentClientCreateV2.restype = MaaAgentClientHandle
73
+ Library.agent_client().MaaAgentClientCreateV2.argtypes = [
74
+ MaaStringBufferHandle,
75
+ ]
76
+
77
+ Library.agent_client().MaaAgentClientIdentifier.restype = MaaBool
78
+ Library.agent_client().MaaAgentClientIdentifier.argtypes = [
79
+ MaaAgentClientHandle,
80
+ MaaStringBufferHandle,
81
+ ]
67
82
 
68
83
  Library.agent_client().MaaAgentClientDestroy.restype = None
69
84
  Library.agent_client().MaaAgentClientDestroy.argtypes = [MaaAgentClientHandle]
@@ -74,12 +89,6 @@ class AgentClient:
74
89
  MaaResourceHandle,
75
90
  ]
76
91
 
77
- Library.agent_client().MaaAgentClientCreateSocket.restype = MaaBool
78
- Library.agent_client().MaaAgentClientCreateSocket.argtypes = [
79
- MaaAgentClientHandle,
80
- MaaStringBufferHandle,
81
- ]
82
-
83
92
  Library.agent_client().MaaAgentClientConnect.restype = MaaBool
84
93
  Library.agent_client().MaaAgentClientConnect.argtypes = [
85
94
  MaaAgentClientHandle,
@@ -89,3 +98,8 @@ class AgentClient:
89
98
  Library.agent_client().MaaAgentClientDisconnect.argtypes = [
90
99
  MaaAgentClientHandle,
91
100
  ]
101
+
102
+ Library.agent_client().MaaAgentClientConnected.restype = MaaBool
103
+ Library.agent_client().MaaAgentClientConnected.argtypes = [
104
+ MaaAgentClientHandle,
105
+ ]
Binary file
Binary file
Binary file
Binary file
Binary file
maa/bin/libMaaToolkit.so CHANGED
Binary file
maa/bin/libMaaUtils.so CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MaaFw
3
- Version: 4.2.0b1
3
+ Version: 4.2.1
4
4
  Summary: An automation black-box testing framework based on image recognition
5
5
  Project-URL: Homepage, https://github.com/MaaXYZ/MaaFramework
6
6
  Author: MaaXYZ
@@ -1,5 +1,5 @@
1
1
  maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
2
- maa/agent_client.py,sha256=MGjwVCM_Y60O2pJJn5iCxh0ymg-ebOWlDw2euSaZSu0,2855
2
+ maa/agent_client.py,sha256=vrL1pyqYyK2CQePbMbCQraZnzx0rPaYWK4G8D9qU__Y,3365
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
@@ -14,17 +14,17 @@ 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
- maa/bin/libMaaAdbControlUnit.so,sha256=i-lyBCqeK5TWk4b7FDCGTmeXqG5HYByyvP4aT9P9clQ,15557984
18
- maa/bin/libMaaAgentClient.so,sha256=4pjg12-EoARrqWskl21SH-udbgfChqfI6ZhhqWMIfRc,7992208
19
- maa/bin/libMaaAgentServer.so,sha256=ua-TgZrzudvjaW9lorSnGOKXtnR4N1X3Xx602XYmeBs,14496320
20
- maa/bin/libMaaDbgControlUnit.so,sha256=OI4QqP8ckJwMcLa3BBhSNjOjWbAbZFOU9I2zAP7NBX0,4400712
21
- maa/bin/libMaaFramework.so,sha256=iLcMGWrMgmw6mfIDG5g_4UlkR1ME2T8WNONkUL30djM,41524808
22
- maa/bin/libMaaToolkit.so,sha256=zhDVR7IOEgbwgh4gI3jLt5KtML6CZekoGSg1PFhHbts,14209568
23
- maa/bin/libMaaUtils.so,sha256=hUuGi974znGN-zFXMs-UXzm2RMrzZrQRvKAlvSWEjao,6199904
17
+ maa/bin/libMaaAdbControlUnit.so,sha256=1XQY92x0unAwh4_1BzQlojjEuFQuuHe-XPi4Qx6SPnw,925392
18
+ maa/bin/libMaaAgentClient.so,sha256=vXS2896swsV4FrcZquITA82TkBs_baRrb49mYZbSua8,2063184
19
+ maa/bin/libMaaAgentServer.so,sha256=PLBl2_qLilTJBS5PEA0ZmYN3-aAb4sHcQ5fUkx-rcSQ,2239776
20
+ maa/bin/libMaaDbgControlUnit.so,sha256=PV5QwoPtQhEb-tOJ1Sq0kf_zAy_zOcOqPXEXncRrfjQ,415056
21
+ maa/bin/libMaaFramework.so,sha256=QOCJ_uyreymY2beeSa5NyUKmp2oeLib8_aaJOGosL2c,2723072
22
+ maa/bin/libMaaToolkit.so,sha256=CFPW-Are8f9QZhQOR4U7yTTbpFxRckmnukOV19oIGXY,1363120
23
+ maa/bin/libMaaUtils.so,sha256=2tuxLpaJz_Pczz9iRd_ShKP6kZHPh_byGdkwHPggJHw,888272
24
24
  maa/bin/libfastdeploy_ppocr.so,sha256=OPB9oG0O7ZGNZUuY9U0nPsWcWnIN9xu1s0PRvXkmUEY,5815536
25
25
  maa/bin/libonnxruntime.so.1,sha256=LiAUFtvZ6eh6yGCoDoqSdN1fWR6LCyscxjQbOpdo14w,19769616
26
26
  maa/bin/libopencv_world4.so.408,sha256=fb-nh6oI32qImBiK1hRu7gSoe1u7r2aRbXxyCIgxPaA,16272176
27
- maafw-4.2.0b1.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
28
- maafw-4.2.0b1.dist-info/METADATA,sha256=xjFgpCZkKoSimBS3OZL9XWm53uI6Q0Zh9rMUTfEr4ag,21233
29
- maafw-4.2.0b1.dist-info/WHEEL,sha256=8rPUfYBEmDdlgJUoJH6dpknsfcdCdyH-ZatJmZBsaqM,105
30
- maafw-4.2.0b1.dist-info/RECORD,,
27
+ maafw-4.2.1.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
28
+ maafw-4.2.1.dist-info/METADATA,sha256=wXL5_ve6TIvhZC7Cik5f-Jb8PF8UxJoEfYYirv5Le80,21231
29
+ maafw-4.2.1.dist-info/WHEEL,sha256=8rPUfYBEmDdlgJUoJH6dpknsfcdCdyH-ZatJmZBsaqM,105
30
+ maafw-4.2.1.dist-info/RECORD,,
File without changes