You are here

function acquia_agent_call in Acquia Connector 6

Same name and namespace in other branches
  1. 6.2 acquia_agent/acquia_agent.module \acquia_agent_call()
  2. 7.3 acquia_agent/acquia_agent.module \acquia_agent_call()
  3. 7 acquia_agent/acquia_agent.module \acquia_agent_call()
  4. 7.2 acquia_agent/acquia_agent.module \acquia_agent_call()

Prepare and send a XML-RPC request to Acquia Network with an authenticator.

3 calls to acquia_agent_call()
acquia_agent_check_subscription in acquia_agent/acquia_agent.module
Get subscription status from the Acquia Network, and store the result.
acquia_agent_valid_credentials in acquia_agent/acquia_agent.module
Validate identifier/key pair via XML-RPC call to Acquia Network address.
acquia_spi_send_profile_info in acquia_spi/acquia_spi.module
Send site profile information to Acquia Network via XML-RPC.

File

acquia_agent/acquia_agent.module, line 368
Acquia Agent securely sends information to Acquia Network.

Code

function acquia_agent_call($method, $params, $identifier = NULL, $key = NULL, $acquia_network_address = NULL) {
  $path = drupal_get_path('module', 'acquia_agent');
  require_once $path . '/acquia_agent_streams.inc';
  $acquia_network_address = acquia_agent_network_address($acquia_network_address);
  $host = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : '';
  $data = array(
    'authenticator' => _acquia_agent_authenticator($params, $identifier, $key),
    'host' => $host,
    'body' => $params,
  );
  $data['result'] = _acquia_agent_request($acquia_network_address, $method, $data);
  return $data;
}