MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / __init__

Method __init__

source/binding/Python/maa/controller.py:986–1009  ·  view source on GitHub ↗

创建 PlayCover 控制器 / Create PlayCover controller Args: address: PlayTools 服务地址 (host:port) / PlayTools service endpoint (host:port) uuid: 目标应用 bundle identifier / Target app bundle identifier Raises: RuntimeError: 如果创建失败

(
        self,
        address: str,
        uuid: str,
    )

Source from the content-addressed store, hash-verified

984 """
985
986 def __init__(
987 self,
988 address: str,
989 uuid: str,
990 ):
991 """创建 PlayCover 控制器 / Create PlayCover controller
992
993 Args:
994 address: PlayTools 服务地址 (host:port) / PlayTools service endpoint (host:port)
995 uuid: 目标应用 bundle identifier / Target app bundle identifier
996
997 Raises:
998 RuntimeError: 如果创建失败
999 """
1000 super().__init__()
1001 self._set_playcover_api_properties()
1002
1003 self._handle = Library.framework().MaaPlayCoverControllerCreate(
1004 address.encode(),
1005 uuid.encode(),
1006 )
1007
1008 if not self._handle:
1009 raise RuntimeError("Failed to create PlayCover controller.")
1010
1011 def _set_playcover_api_properties(self):
1012 Library.framework().MaaPlayCoverControllerCreate.restype = MaaControllerHandle

Callers

nothing calls this directly

Calls 3

frameworkMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected