[ Index ]

PHP Cross Reference of phpBB-3.2.2-deutsch

title

Body

[close]

/includes/ -> functions_jabber.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 904 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

jabber:: (22 methods):
  __construct()
  can_use_ssl()
  can_use_tls()
  set_resource()
  connect()
  disconnect()
  connected()
  login()
  send()
  open_socket()
  get_log()
  add_to_log()
  listen()
  register()
  send_presence()
  response()
  send_message()
  encrypt_password()
  parse_data()
  implode_data()
  xmlize()
  _xml_depth()


Class: jabber  - X-Ref

Jabber class from Flyspray project

__construct($server, $port, $username, $password, $use_ssl = false, $verify_peer = true, $verify_peer_name = true, $allow_self_signed = false)   X-Ref
Constructor

param: string $server Jabber server
param: int $port Jabber server port
param: string $username Jabber username or JID
param: string $password Jabber password
param: boold $use_ssl Use ssl
param: bool $verify_peer Verify SSL certificate
param: bool $verify_peer_name Verify Jabber peer name
param: bool $allow_self_signed Allow self signed certificates

can_use_ssl()   X-Ref
Able to use the SSL functionality?


can_use_tls()   X-Ref
Able to use TLS?


set_resource($name)   X-Ref
Sets the resource which is used. No validation is done here, only escaping.

param: string $name

connect()   X-Ref
Connect


disconnect()   X-Ref
Disconnect


connected()   X-Ref
Connected?


login()   X-Ref
Initiates login (using data from contructor, after calling connect())

return: bool

send($xml)   X-Ref
Send data to the Jabber server

param: string $xml
return: bool

open_socket($server, $port, $use_ssl, $verify_peer, $verify_peer_name, $allow_self_signed)   X-Ref
OpenSocket

param: string $server host to connect to
param: int $port port number
param: bool $use_ssl use ssl or not
param: bool $verify_peer verify ssl certificate
param: bool $verify_peer_name verify peer name
param: bool $allow_self_signed allow self-signed ssl certificates
return: bool

get_log()   X-Ref
Return log


add_to_log($string)   X-Ref
Add information to log


listen($timeout = 10, $wait = false)   X-Ref
Listens to the connection until it gets data or the timeout is reached.
Thus, it should only be called if data is expected to be received.

return: mixed either false for timeout or an array with the received data

register()   X-Ref
Initiates account registration (based on data used for contructor)

return: bool

send_presence($message = '', $type = '', $unavailable = false)   X-Ref
Sets account presence. No additional info required (default is "online" status)

param: $message online, offline...
param: $type dnd, away, chat, xa or nothing
param: $unavailable set this to true if you want to become unavailable
return: bool

response($xml)   X-Ref
This handles all the different XML elements

param: array $xml
return: bool

send_message($to, $text, $subject = '', $type = 'normal')   X-Ref
No description

encrypt_password($data)   X-Ref
Encrypts a password as in RFC 2831

param: array $data Needs data from the client-server connection
return: string

parse_data($data)   X-Ref
parse_data like a="b",c="d",... or like a="a, b", c, d="e", f=g,...

param: string $data
return: array a => b ...

implode_data($data)   X-Ref
opposite of jabber::parse_data()

param: array $data
return: string

xmlize($data, $skip_white = 1, $encoding = 'UTF-8')   X-Ref
xmlize()

author: Hans Anderson

_xml_depth($vals, &$i)   X-Ref
_xml_depth()

author: Hans Anderson



Generated: Thu Jan 11 23:14:31 2018 Cross-referenced by PHPXref 0.7.1