def start_pairing
      @gtv = GoogleAnymote::TV.new(@cert, host, 9551 + 1)

      # Let the TV know that we want to pair with it
      send_message(pair, OuterMessage::MessageType::MESSAGE_TYPE_PAIRING_REQUEST)

      # Build the options and send them to the TV
      options       = Options.new
      encoding      = Options::Encoding.new
      encoding.type = Options::Encoding::EncodingType::ENCODING_TYPE_HEXADECIMAL
      encoding.symbol_length = 4
      options.input_encodings   << encoding
      options.output_encodings  << encoding
      send_message(options, OuterMessage::MessageType::MESSAGE_TYPE_OPTIONS)

      # Build configuration and send it to the TV
      config        = Configuration.new
      encoding      = Options::Encoding.new
      encoding.type = Options::Encoding::EncodingType::ENCODING_TYPE_HEXADECIMAL
      config.encoding               = encoding
      config.encoding.symbol_length = 4
      config.client_role            = Options::RoleType::ROLE_TYPE_INPUT
      outer = send_message(config, OuterMessage::MessageType::MESSAGE_TYPE_CONFIGURATION)
      
      raise PairingFailed, outer.status unless OuterMessage::Status::STATUS_OK == outer.status
    end
def start_pairing
      @gtv = GoogleAnymote::TV.new(@cert, host, 9551 + 1)

      # Let the TV know that we want to pair with it
      send_message(pair, OuterMessage::MessageType::MESSAGE_TYPE_PAIRING_REQUEST)

      # Build the options and send them to the TV
      options       = Options.new
      encoding      = Options::Encoding.new
      encoding.type = Options::Encoding::EncodingType::ENCODING_TYPE_HEXADECIMAL
      encoding.symbol_length = 4
      options.input_encodings   << encoding
      options.output_encodings  << encoding
      send_message(options, OuterMessage::MessageType::MESSAGE_TYPE_OPTIONS)

      # Build configuration and send it to the TV
      config        = Configuration.new
      encoding      = Options::Encoding.new
      encoding.type = Options::Encoding::EncodingType::ENCODING_TYPE_HEXADECIMAL
      config.encoding               = encoding
      config.encoding.symbol_length = 4
      config.client_role            = Options::RoleType::ROLE_TYPE_INPUT
      outer = send_message(config, OuterMessage::MessageType::MESSAGE_TYPE_CONFIGURATION)
      
      raise PairingFailed, outer.status unless OuterMessage::Status::STATUS_OK == outer.status
    end
Initializes the Pair class

 @param [Object] cert SSL certificate for this client
 @param [String] host hostname or IP address of the Google TV
 @param [String] client_name name of the client your connecting from
 @param [String] service_name name of the service (generally 'AnyMote')
 @return an instance of Pair

 Start the pairing process

 Once the TV recieves the pairing request it will display a 4 digit number.
 This number needs to be feed into the next step in the process, complete_pairing().