5.3.3. vlcp.protocol.jsonrpc


This document is generated from the source file.

View Source on GitHub

Created on 2015/8/12

exception vlcp.protocol.jsonrpc.JsonFormatException
class vlcp.protocol.jsonrpc.JsonRPC

JSON-RPC 1.0 Protocol




routine for connection closed


routine for connection error


routine for connection initialization

notificationmatcher(method, connection)

Create an event matcher to match specified notifications

parse(connection, data, laststart)

Parse input data into events

  • connection – connection object
  • data – view for input data
  • laststart – last parsed position

(events, keep) where events are parsed events to send, keep is the unused data length to be keeped for next parse.

querywithreply(method, params, connection, container=None, raiseonerror=True)

Send a JSON-RPC request and wait for the reply.

Returns:(result, error) tuple

routine for reconnect

replymatcher(requestid, connection, iserror=None)

Create a matcher to match a reply

statematcher(connection, state='down', currentconn=True)

Create an event matcher to match the connection state

waitfornotify(method, connection, container)

Wait for next notification

Returns:(method, params) from the notification
class vlcp.protocol.jsonrpc.JsonRPCConnectionStateEvent(*args, **kwargs)

Connection state change

exception vlcp.protocol.jsonrpc.JsonRPCErrorResultException(error, result=None)
__init__(error, result=None)

Initialize self. See help(type(self)) for accurate signature.

class vlcp.protocol.jsonrpc.JsonRPCNotificationEvent(*args, **kwargs)

Notification received from the connection

exception vlcp.protocol.jsonrpc.JsonRPCProtocolException
class vlcp.protocol.jsonrpc.JsonRPCRequestEvent(*args, **kwargs)

Request received from the connection


Extra criteria for an event with canignore = False. When this event returns True, the event is safely ignored.

class vlcp.protocol.jsonrpc.JsonRPCResponseEvent(*args, **kwargs)

Response received from the connection