示例#1
0
 def get_json_with_scope(self,
                         key,
                         view=None,
                         scope=SettingsScope.SettingsAutoScope):
     if view is not None:
         view = view.handle
     c_scope = core.SettingsScopeEnum(scope)
     result = core.BNSettingsGetJson(self.handle, key, view,
                                     ctypes.byref(c_scope))
     return (result, SettingsScope(c_scope.value))
示例#2
0
 def get_string_with_scope(self,
                           id,
                           view=None,
                           scope=SettingsScope.SettingsAutoScope):
     if view is not None:
         view = view.handle
     c_scope = core.SettingsScopeEnum(scope)
     result = core.BNSettingsGetString(self.registry_id, id, view,
                                       ctypes.byref(c_scope))
     return (result, SettingsScope(c_scope.value))
示例#3
0
	def get_string_list_with_scope(self, key, view = None, scope = SettingsScope.SettingsAutoScope):
		if view is not None:
			view = view.handle
		c_scope = core.SettingsScopeEnum(scope)
		length = ctypes.c_ulonglong()
		result = core.BNSettingsGetStringList(self.handle, key, view, ctypes.byref(c_scope), ctypes.byref(length))
		out_list = []
		for i in range(length.value):
			out_list.append(pyNativeStr(result[i]))
		core.BNFreeStringList(result, length)
		return (out_list, SettingsScope(c_scope.value))