Skip to content

Commit

Permalink
XPCDictionary: add get_value() and set_value()
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Jul 17, 2023
1 parent c346fff commit a7bfc94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/rpcclient/rpcclient/darwin/xpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def set_dictionary(self, key: str, value: int) -> None:
def set_object(self, obj: XPCObject) -> None:
self._client.symbols.xpc_dictionary_set_object(self, obj)

def set_value(self, obj: XPCObject) -> None:
self._client.symbols.xpc_dictionary_set_value(self, obj)

def get_string(self, key: str) -> str:
return self._client.symbols.xpc_dictionary_get_string(self, key).peek_str()

Expand All @@ -67,8 +70,11 @@ def get_uuid(self, key: str) -> str:
def get_dictionary(self, key: str) -> 'XPCDictionary':
return XPCDictionary.create(self._client.symbols.xpc_dictionary_get_dictionary(self, key), self._client)

def get_object(self) -> XPCObject:
return XPCObject.create(self._client.symbols.xpc_dictionary_get_object(), self._client)
def get_object(self, key: str) -> XPCObject:
return XPCObject.create(self._client.symbols.xpc_dictionary_get_object(self, key), self._client)

def get_value(self, key: str) -> XPCObject:
return XPCObject.create(self._client.symbols.xpc_dictionary_get_value(self, key), self._client)


class Xpc:
Expand Down

0 comments on commit a7bfc94

Please sign in to comment.