User variables defined in hook_variable_info() in rules I'm declaring the varialbes of a custom module in hook_variable_info(). Now I'd like to access some of them in rules. How can I do that?

The reason for this is that the Variable module gives me the chance to added fine grained access control for this values. Otherwise I would be forced to give users full access to administer rules.

Update: I found this issue: Make Drupal variables accessible with data browser in rules
To be honest I don't fully understand what it is saying.
As the Rules module uses tokens, and the Variable module implements hook_tokens(), you should not do anything.  

If the value returned from that implementation of hook_tokens() is not the value you would expect, in a module of yours you could implement hook_tokens_alter() to alter the token values returned by the Variable module.

Reading Entity property information, I get fago means code similar to the following one should be used.

function mymodule_entity_property_info() {
  $info = array();

  // Add meta-data about the variables exposed from the Variable module.
  $properties = &amp;$info['site']['properties'];

  // ...

  return $info;
}


I didn't find any information about the parameters passed, for example, to the setter callback, even though entity_property_verbatim_set() is defined as entity_property_verbatim_set(&amp;$data, $name, $value, $langcode, $type, $info).

function entity_property_verbatim_set(&amp;$data, $name, $value, $langcode, $type, $info) {
  $name = isset($info['schema field']) ? $info['schema field'] : $name;
  if (is_array($data) || (is_object($data) &amp;&amp; $data instanceof ArrayAccess)) {
    $data[$name] = $value;
  }
  elseif (is_object($data)) {
    $data-&gt;$name = $value;
  }
}


Vice versa, entity_metadata_user_set_properties() is defined as entity_metadata_user_set_properties($account, $name, $value).

function entity_metadata_user_set_properties($account, $name, $value) {
  switch ($name) {
    case 'roles':
      $account-&gt;roles = array_intersect_key(user_roles(), array_flip($value));
      break;
  }
}


entity_metadata_user_entity_property_info() uses that setter callback in the following definition.

  $properties['roles'] = array(
    'label' =&gt; t("User roles"), 
    'description' =&gt; t("The roles of the user."), 
    'type' =&gt; 'list&lt;integer&gt;', 
    'getter callback' =&gt; 'entity_metadata_user_get_properties', 
    'setter callback' =&gt; 'entity_metadata_user_set_properties', 
    'setter permission' =&gt; 'administer users', 
    'options list' =&gt; 'entity_metadata_user_roles', 
    'access callback' =&gt; 'entity_metadata_user_properties_access',
  );