MaaFw 4.2.0a1__py3-none-macosx_13_0_x86_64.whl → 4.2.1__py3-none-macosx_13_0_x86_64.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
Binary file
maa/bin/libMaaUtils.dylib CHANGED
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MaaFw
3
- Version: 4.2.0a1
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
@@ -0,0 +1,30 @@
1
+ maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
2
+ maa/agent_client.py,sha256=vrL1pyqYyK2CQePbMbCQraZnzx0rPaYWK4G8D9qU__Y,3365
3
+ maa/buffer.py,sha256=XFr1MnWt-xmZkhQ_2ZzGfiqSJJwmphY4U07EEzMNYQc,16544
4
+ maa/context.py,sha256=hOxo7GArAmdBwMGHPqM1I2rtNE5N6WR1QwPOLxZgSvU,5754
5
+ maa/controller.py,sha256=V9ALn24vQX-mWngZbuapBcv-_HNHCtUwHXa3Em2X13s,22517
6
+ maa/custom_action.py,sha256=V-kJ-5ahcImnzrZBbAH_RJqoiQ7RjBT39ffdSOi9_c4,2495
7
+ maa/custom_recognition.py,sha256=P8Kfh4PWoQXyw7loE-9zv_VCD2HUcE6qkIXCK_Ye9a4,3372
8
+ maa/define.py,sha256=qec4GQkYi6AtorJ1ix880Fz67bpZULJOV3VpZEDd2Es,13341
9
+ maa/job.py,sha256=MUI5T2X9ON9c7Dl6yo_0pp8Ulpn25XOD_uEdGm2k-TA,1231
10
+ maa/library.py,sha256=9af7ncHUk33N5JcacaAk87JLKkP3atu-J8wf-CvfYhw,3891
11
+ maa/notification_handler.py,sha256=LFJY6YqF9fJSkRsvpmj6ZL5DexMN_cEOj-HmpWpB9o0,5442
12
+ maa/resource.py,sha256=gjcYnhaLzR11jM9nd-QfUeVEsBDgJkubOQ3YiMZN5ic,11529
13
+ maa/tasker.py,sha256=cAkYW8Mu5rAgsPlSGacTjJ830sF2yFtvlmXRvIJt-A4,14811
14
+ maa/toolkit.py,sha256=H7P58dPLKzEm_aZMsDJ98IaMZnTE-hcFgK8MKnN0F6g,11381
15
+ maa/agent/__init__.py,sha256=K4vyyD6YgLR6PEQl86t4oKP4eViCdNr3Br94dNk8YjM,257
16
+ maa/agent/agent_server.py,sha256=e0yE_ffWJlTPydJbYLK9OhCM5fVVlZQIcvEQMjB5V68,3636
17
+ maa/bin/libMaaAdbControlUnit.dylib,sha256=CQpj-q7fj_KT2gDN9czpOwls99B5_2vDkAGtFojEmMM,748216
18
+ maa/bin/libMaaAgentClient.dylib,sha256=nmoBHM5AtPk_W4mcQkzrTLEeNm20NXdmlnE0aNp2Ttw,1412808
19
+ maa/bin/libMaaAgentServer.dylib,sha256=gp0vmCpJXwkeUiy8YccFsfDlW90Ic7TpVQxG9St0MtY,1683232
20
+ maa/bin/libMaaDbgControlUnit.dylib,sha256=eeHlc8ehrvINilXG5vJOenKB45G3nWtSCdXJckhMP1w,347936
21
+ maa/bin/libMaaFramework.dylib,sha256=D5GQ5Zy9v0ym9Nsmwbbxy6y2W4ZVjQDm2nmEymeeZ44,2442328
22
+ maa/bin/libMaaToolkit.dylib,sha256=1hb2OA2WoXkaaXXPiJr5f_hSh7mZ8CLMbU_QCegyCE0,929264
23
+ maa/bin/libMaaUtils.dylib,sha256=IQM-hY1BbskOePlKLQ4s1Kk-5mwLDrpURo3ccW7A3Ec,541208
24
+ maa/bin/libfastdeploy_ppocr.dylib,sha256=kFxpYAawihiGofHIiOe8Q1p-PCdRG7q4PsaCnhohIwg,5828240
25
+ maa/bin/libonnxruntime.1.19.2.dylib,sha256=6FX7LDczOFARpdTe8r2otMXgvlMtkaHcfQSzXMgxT4A,19921160
26
+ maa/bin/libopencv_world4.4.8.0.dylib,sha256=OYyb77pNXcqdUQEVTXE6Nz_iWS7jp9Zr3rZOw2DNpy0,16908328
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=uH4n7Su0XdKLw9IB_vCifAJxZvl_ChRwTrm1-ddvWvA,102
30
+ maafw-4.2.1.dist-info/RECORD,,
maa/bin/libc++.1.dylib DELETED
Binary file
maa/bin/libc++abi.1.dylib DELETED
Binary file
maa/bin/libunwind.1.dylib DELETED
Binary file
@@ -1,33 +0,0 @@
1
- maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
2
- maa/agent_client.py,sha256=MGjwVCM_Y60O2pJJn5iCxh0ymg-ebOWlDw2euSaZSu0,2855
3
- maa/buffer.py,sha256=XFr1MnWt-xmZkhQ_2ZzGfiqSJJwmphY4U07EEzMNYQc,16544
4
- maa/context.py,sha256=hOxo7GArAmdBwMGHPqM1I2rtNE5N6WR1QwPOLxZgSvU,5754
5
- maa/controller.py,sha256=V9ALn24vQX-mWngZbuapBcv-_HNHCtUwHXa3Em2X13s,22517
6
- maa/custom_action.py,sha256=V-kJ-5ahcImnzrZBbAH_RJqoiQ7RjBT39ffdSOi9_c4,2495
7
- maa/custom_recognition.py,sha256=P8Kfh4PWoQXyw7loE-9zv_VCD2HUcE6qkIXCK_Ye9a4,3372
8
- maa/define.py,sha256=qec4GQkYi6AtorJ1ix880Fz67bpZULJOV3VpZEDd2Es,13341
9
- maa/job.py,sha256=MUI5T2X9ON9c7Dl6yo_0pp8Ulpn25XOD_uEdGm2k-TA,1231
10
- maa/library.py,sha256=9af7ncHUk33N5JcacaAk87JLKkP3atu-J8wf-CvfYhw,3891
11
- maa/notification_handler.py,sha256=LFJY6YqF9fJSkRsvpmj6ZL5DexMN_cEOj-HmpWpB9o0,5442
12
- maa/resource.py,sha256=gjcYnhaLzR11jM9nd-QfUeVEsBDgJkubOQ3YiMZN5ic,11529
13
- maa/tasker.py,sha256=cAkYW8Mu5rAgsPlSGacTjJ830sF2yFtvlmXRvIJt-A4,14811
14
- maa/toolkit.py,sha256=H7P58dPLKzEm_aZMsDJ98IaMZnTE-hcFgK8MKnN0F6g,11381
15
- maa/agent/__init__.py,sha256=K4vyyD6YgLR6PEQl86t4oKP4eViCdNr3Br94dNk8YjM,257
16
- maa/agent/agent_server.py,sha256=e0yE_ffWJlTPydJbYLK9OhCM5fVVlZQIcvEQMjB5V68,3636
17
- maa/bin/libMaaAdbControlUnit.dylib,sha256=ngHw0o-GgP977O58GJnt-Pu23ASazxVmW0n7M4L9Ffg,851200
18
- maa/bin/libMaaAgentClient.dylib,sha256=IMFyQSct8S1KXprLoSttlZGF1g-QjoBb5AhhovOxpT4,1634720
19
- maa/bin/libMaaAgentServer.dylib,sha256=QbH_uEcNRxF2_iwK6G5hdUPjREl-nfHFk9NOiSIbDUo,1849168
20
- maa/bin/libMaaDbgControlUnit.dylib,sha256=TvJIFp4mul1Q-zX0r3Kt4fT0j-_ekCBTgckvEyazv9U,423456
21
- maa/bin/libMaaFramework.dylib,sha256=IuZFFYhWwMFGMEeksgrZtJwLIbwDdlElkhB5CB1ahrQ,2664240
22
- maa/bin/libMaaToolkit.dylib,sha256=mCfImslKyPspc8yMh_2bDZY7SmKejZkf9aLv8863uns,1087616
23
- maa/bin/libMaaUtils.dylib,sha256=RzKZjLXtbw8ORpnqblZnYrFyzP96PbRI3l4axHbPmdY,662720
24
- maa/bin/libc++.1.dylib,sha256=HegYEmz0WOeWHS8piB7W-Q91tGB9ATlIHn5MuIJfItQ,1176336
25
- maa/bin/libc++abi.1.dylib,sha256=cxSIuak6msWKozxjmWY64TW8C4kk_55YWx9eYX229R0,368224
26
- maa/bin/libfastdeploy_ppocr.dylib,sha256=tSvJPzuSveJXfcZKouwhQvU99Mp1WNFJKVvG1Llobqs,5892048
27
- maa/bin/libonnxruntime.1.19.2.dylib,sha256=f8EBJ8zYzL1YyofthTy0ochZgofp3yrSZxAbFWZXoXk,20095056
28
- maa/bin/libopencv_world4.4.8.0.dylib,sha256=4p4JxFEzDj3aIjEmwJ5xU6swYWwC-T2hMpwCIosxV7M,17058736
29
- maa/bin/libunwind.1.dylib,sha256=6v5pc5uXnKT-2LCbojC_r_qy1KLdhm2bYt52IrOv7rw,110656
30
- maafw-4.2.0a1.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
31
- maafw-4.2.0a1.dist-info/METADATA,sha256=CDWGIyeyv2-AQ3W8dWT4c6OD-Qk-9dAr3XTO7thDa4o,21233
32
- maafw-4.2.0a1.dist-info/WHEEL,sha256=uH4n7Su0XdKLw9IB_vCifAJxZvl_ChRwTrm1-ddvWvA,102
33
- maafw-4.2.0a1.dist-info/RECORD,,
File without changes