[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/ -> functions_jabber.php (summary)

(no description)

Copyright: (c) 2007 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 873 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

jabber:: (22 methods):
  jabber()
  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

jabber($server, $port, $username, $password, $use_ssl = false)   X-Ref
No description

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 = false)   X-Ref
OpenSocket

param: string $server host to connect to
param: int $port port number
param: bool $use_ssl use ssl or not
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: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1