You are here

function messaging_xmpp_messaging in Messaging 6.4

Same name and namespace in other branches
  1. 6.2 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_messaging()
  2. 6.3 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_messaging()

Implementation of hook_messaging

File

messaging_xmpp/messaging_xmpp.module, line 78
XMPP Messsaging. Messaging method plug-in

Code

function messaging_xmpp_messaging($op) {
  switch ($op) {
    case 'send methods':
      $info['xmpp'] = array(
        'title' => t('XMPP'),
        'name' => t('XMPP'),
        'type' => MESSAGING_TYPE_PUSH,
        'glue' => "\n",
        'description' => t('Send XMPP using XMPP Framework.'),
        'address_type' => 'xmpp',
        'send callback' => 'messaging_xmpp_send_msg',
        'render callback' => 'messaging_xmpp_render',
        'user callback' => 'messaging_xmpp_user_check',
        'anonymous' => TRUE,
      );
      return $info;
    case 'address types':
      $info['xmpp'] = array(
        'name' => t('XMPP account'),
        // Name of the address for this method
        'user2address callback' => 'messaging_xmpp_user_destination',
        // Mapping user account to address
        'validate callback' => 'valid_email_address',
      );
      return $info;
  }
}