Esempio n. 1
0
static void
implement_call_stream (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) ring_svc_call_stream_implement_##x (\
  klass, ring_call_stream_##x)
  IMPLEMENT (set_sending);
  IMPLEMENT (request_receiving);
#undef IMPLEMENT
}
static void
channel_dispatcher_iface_init (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_channel_dispatcher_implement_##x (\
  klass, tp_tests_simple_channel_dispatcher_##x)
  IMPLEMENT (create_channel);
  IMPLEMENT (ensure_channel);
#undef IMPLEMENT
}
Esempio n. 3
0
/**
 * tp_properties_mixin_iface_init:
 * @g_iface: A pointer to the #TpSvcPropertiesInterfaceClass in an object class
 * @iface_data: Ignored
 *
 * Fill in this mixin's method implementations in the given interface vtable.
 * This function should usually be called via G_IMPLEMENT_INTERFACE
 * inside the G_DEFINE_TYPE_WITH_CODE macro.
 */
void
tp_properties_mixin_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcPropertiesInterfaceClass *klass = g_iface;

#define IMPLEMENT(x) tp_svc_properties_interface_implement_##x (klass, x)
  IMPLEMENT(get_properties);
  IMPLEMENT(list_properties);
  IMPLEMENT(set_properties);
#undef IMPLEMENT
}
Esempio n. 4
0
/**
 * tp_contacts_mixin_iface_init: (skip)
 * @g_iface: A pointer to the #TpSvcConnectionInterfaceContacts in an object
 * class
 * @iface_data: Ignored
 *
 * Fill in the vtable entries needed to implement the contacts interface
 * using this mixin. This function should usually be called via
 * G_IMPLEMENT_INTERFACE.
 *
 * Since: 0.7.14
 *
 */
void
tp_contacts_mixin_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcConnectionInterfaceContactsClass *klass =
    (TpSvcConnectionInterfaceContactsClass *) g_iface;

#define IMPLEMENT(x) tp_svc_connection_interface_contacts_implement_##x ( \
    klass, tp_contacts_mixin_##x##_impl)
  IMPLEMENT(get_contact_attributes);
  IMPLEMENT(get_contact_by_id);
#undef IMPLEMENT
}
Esempio n. 5
0
void
location_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcConnectionInterfaceLocationClass *klass = g_iface;

#define IMPLEMENT(x) tp_svc_connection_interface_location_implement_##x \
  (klass, location_##x)
  IMPLEMENT(get_locations);
  IMPLEMENT(set_location);
  IMPLEMENT(request_location);
#undef IMPLEMENT
}
static void
service_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcConnectionManagerClass *klass = g_iface;

#define IMPLEMENT(x) tp_svc_connection_manager_implement_##x (klass, \
    tp_base_connection_manager_##x)
  IMPLEMENT(get_parameters);
  IMPLEMENT(list_protocols);
  IMPLEMENT(request_connection);
#undef IMPLEMENT
}
static void
channel_iface_init (gpointer iface,
                    gpointer data)
{
  TpSvcChannelClass *klass = iface;

#define IMPLEMENT(x) tp_svc_channel_implement_##x (klass, channel_##x)
  IMPLEMENT (close);
  IMPLEMENT (get_channel_type);
  IMPLEMENT (get_handle);
  IMPLEMENT (get_interfaces);
#undef IMPLEMENT
}
Esempio n. 8
0
static void
sasl_auth_iface_init (gpointer klass,
    gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) \
  tp_svc_channel_interface_sasl_authentication_implement_##x (   \
      klass, gabble_server_sasl_channel_##x)
  IMPLEMENT (start_mechanism);
  IMPLEMENT (start_mechanism_with_data);
  IMPLEMENT (respond);
  IMPLEMENT (accept_sasl);
  IMPLEMENT (abort_sasl);
#undef IMPLEMENT
}
Esempio n. 9
0
static void
init_aliasing (gpointer iface,
               gpointer iface_data G_GNUC_UNUSED)
{
  TpSvcConnectionInterfaceAliasingClass *klass = iface;

#define IMPLEMENT(x) tp_svc_connection_interface_aliasing_implement_##x (\
    klass, x)
  IMPLEMENT(get_alias_flags);
  IMPLEMENT(request_aliases);
  IMPLEMENT(get_aliases);
  IMPLEMENT(set_aliases);
#undef IMPLEMENT
}
Esempio n. 10
0
static void
channel_manager_iface_init(gpointer ifacep,
  gpointer data)
{
  TpChannelManagerIface *iface = ifacep;

#define IMPLEMENT(x) iface->x = ring_media_manager_##x

  IMPLEMENT(foreach_channel);
  IMPLEMENT(foreach_channel_class);
  IMPLEMENT(create_channel);
  IMPLEMENT(request_channel);
  IMPLEMENT(ensure_channel);

#undef IMPLEMENT
}
Esempio n. 11
0
static void
account_manager_iface_init (gpointer klass,
                            gpointer unused G_GNUC_UNUSED)
{
#define IMPLEMENT(x) tp_svc_account_manager_implement_##x (\
  klass, tp_tests_simple_account_manager_##x)
    IMPLEMENT (create_account);
#undef IMPLEMENT
}
void
conn_power_saving_iface_init (gpointer g_iface,
    gpointer iface_data)
{
#define IMPLEMENT(x) \
  tp_svc_connection_interface_power_saving_implement_##x (\
  g_iface, conn_power_saving_##x)
  IMPLEMENT (set_power_saving);
#undef IMPLEMENT
}
Esempio n. 13
0
    static void
destroyable_iface_init (gpointer iface,
        gpointer data)
{
    TpSvcChannelInterfaceDestroyableClass *klass = iface;

#define IMPLEMENT(x) \
    tp_svc_channel_interface_destroyable_implement_##x (klass, destroyable_##x)
    IMPLEMENT (destroy);
#undef IMPLEMENT
}
static void
text_iface_init (gpointer iface,
                 gpointer data)
{
  TpSvcChannelTypeTextClass *klass = iface;

  tp_text_mixin_iface_init (iface, data);
#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass, text_##x)
  IMPLEMENT (send);
#undef IMPLEMENT
}
Esempio n. 15
0
static void
svc_iface_init (gpointer g_iface,
    gpointer iface_data)
{
  EmpSvcChatManagerClass *klass = (EmpSvcChatManagerClass *) g_iface;

#define IMPLEMENT(x) emp_svc_chat_manager_implement_##x (\
    klass, empathy_chat_manager_dbus_##x)
  IMPLEMENT(undo_closed_chat);
#undef IMPLEMENT
}
Esempio n. 16
0
static void
room_list_iface_init (gpointer iface,
    gpointer data)
{
  TpSvcChannelTypeRoomListClass *klass = iface;

#define IMPLEMENT(x) \
  tp_svc_channel_type_room_list_implement_##x (klass, room_list_##x)
  IMPLEMENT(list_rooms);
#undef IMPLEMENT
}
Esempio n. 17
0
static void
call_stream_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcCallStreamClass *klass =
    (TpSvcCallStreamClass *) g_iface;

#define IMPLEMENT(x, suffix) tp_svc_call_stream_implement_##x (\
    klass, tp_base_call_stream_##x##suffix)
  IMPLEMENT(set_sending, _dbus);
  IMPLEMENT(request_receiving,);
#undef IMPLEMENT
}
static void
call_stream_media_iface_init (gpointer g_iface, gpointer iface_data)
{
  TpSvcCallStreamInterfaceMediaClass *klass =
      (TpSvcCallStreamInterfaceMediaClass *) g_iface;

#define IMPLEMENT(x) tp_svc_call_stream_interface_media_implement_##x (\
    klass, tp_base_media_call_stream_##x)
  IMPLEMENT(complete_sending_state_change);
  IMPLEMENT(report_sending_failure);
  IMPLEMENT(complete_receiving_state_change);
  IMPLEMENT(report_receiving_failure);
  IMPLEMENT(set_credentials);
  IMPLEMENT(add_candidates);
  IMPLEMENT(finish_initial_candidates);
  IMPLEMENT(fail);
#undef IMPLEMENT
}
Esempio n. 19
0
//----[  SetMagicType  ]-------------------------------------------------------
int SetMagicType(dc::dcGenericResource* resource, void* param) {
  BEGIN_ACTION_BODY();
  CAST_ACTION_RESOURCE(Evidyon::Tools::MagicInterface, magic_interface);


  std::string caption = "Set Magic Type";
  std::list<std::string> type_options;
  type_options.push_back("Spin Attack");
  type_options.push_back("Attack Run");
  type_options.push_back("Leap");
  type_options.push_back("Buff");
  type_options.push_back("AOE");
  type_options.push_back("AOE Buff");
  type_options.push_back("DOT");
  type_options.push_back("DOT - AOE + Buff");
  type_options.push_back("Direct Damage");
  type_options.push_back("Projectile");
  type_options.push_back("Branching");
  type_options.push_back("Portal");
  type_options.push_back("Teleport");
  type_options.push_back("Mutate");
  type_options.push_back("Summon");
  type_options.push_back("Trap - Dimension Door");
  type_options.push_back("Trap - Black Hole");
  type_options.push_back("Disenchant");
  type_options.push_back("Invisibility");
  type_options.push_back("Enchantment - Armor");
  type_options.push_back("Enchantment - Shield");
  type_options.push_back("Enchantment - Reactive Healing");
  type_options.push_back("Enchantment - Thorns");
  type_options.push_back("Heal");
  int selection_index = 0;
  if (!dcx::dcxWin32PromptForSelection(dialog->getWindowHandle(),
                                       caption.c_str(),
                                       "What kind of magic would you like?",
                                       &type_options,
                                       &selection_index,
                                       true)) {
    return 0;
  }

  Evidyon::World::Tools::MapLayer* layer = NULL;
#define IMPLEMENT(type) {magic_interface->implement<\
  Evidyon::Magic::Tools::type>()->setName(*type_iter);}

  std::list<std::string>::iterator type_iter = type_options.begin();
  for (int i = 0; i < selection_index; ++i) {
    ++type_iter;
  }
  switch (selection_index) {
    default:
    case 0: IMPLEMENT(Magic_SpinAttack); break;
    case 1: IMPLEMENT(Magic_AttackRun); break;
    case 2: IMPLEMENT(Magic_Leap); break;
    case 3: IMPLEMENT(Magic_Buff); break;
    case 4: IMPLEMENT(Magic_AOE); break;
    case 5: IMPLEMENT(Magic_AOEBuff); break;
    case 6: IMPLEMENT(Magic_DOT); break;
    case 7: IMPLEMENT(Magic_DOTAOEBuff); break;
    case 8: IMPLEMENT(Magic_DirectDamage); break;
    case 9: IMPLEMENT(Magic_Projectile); break;
    case 10: IMPLEMENT(Magic_Branching); break;
    case 11: IMPLEMENT(Magic_Portal); break;
    case 12: IMPLEMENT(Magic_Teleport); break;
    case 13: IMPLEMENT(Magic_Mutate); break;
    case 14: IMPLEMENT(Magic_Summon); break;
    case 15: IMPLEMENT(Magic_Trap_DimensionDoor); break;
    case 16: IMPLEMENT(Magic_Trap_BlackHole); break;
    case 17: IMPLEMENT(Magic_Disenchant); break;
    case 18: IMPLEMENT(Magic_Invisibility); break;
    case 19: IMPLEMENT(Magic_Enchantment_Armor); break;
    case 20: IMPLEMENT(Magic_Enchantment_Shield); break;
    case 21: IMPLEMENT(Magic_Enchantment_ReactiveHealing); break;
    case 22: IMPLEMENT(Magic_Enchantment_Thorns); break;
    case 23: IMPLEMENT(Magic_Heal); break;
  }
#undef IMPLEMENT

  return 1;
}