Example #1
0
void
opal_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new OPALSpark);
  kickstart.add_spark (spark);
}
Example #2
0
extern "C" void
ekiga_plugin_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new XCAPSpark);
  kickstart.add_spark (spark);
}
Example #3
0
void
engine_init (Ekiga::ServiceCorePtr service_core,
	     int argc,
             char *argv [])
{
  // FIRST we add a few things by hand
  // (for speed and because that's less code)

  Ekiga::ServicePtr notification_core(new Ekiga::NotificationCore);
  service_core->add (notification_core);

  boost::shared_ptr<Ekiga::AccountCore> account_core (new Ekiga::AccountCore);
  boost::shared_ptr<Ekiga::ContactCore> contact_core (new Ekiga::ContactCore);
  boost::shared_ptr<Ekiga::CallCore> call_core (new Ekiga::CallCore);
  boost::shared_ptr<Ekiga::ChatCore> chat_core (new Ekiga::ChatCore);
  boost::shared_ptr<Ekiga::VideoOutputCore> videooutput_core (new Ekiga::VideoOutputCore);
  boost::shared_ptr<Ekiga::VideoInputCore> videoinput_core (new Ekiga::VideoInputCore (*service_core, videooutput_core));
  boost::shared_ptr<Ekiga::AudioOutputCore> audiooutput_core (new Ekiga::AudioOutputCore (*service_core));
  boost::shared_ptr<Ekiga::AudioInputCore> audioinput_core (new Ekiga::AudioInputCore(*service_core));
  boost::shared_ptr<Ekiga::HalCore> hal_core (new Ekiga::HalCore);
  boost::shared_ptr<Ekiga::FriendOrFoe> friend_or_foe (new Ekiga::FriendOrFoe);
  boost::shared_ptr<Gmconf::PersonalDetails> details(new Gmconf::PersonalDetails);
  boost::shared_ptr<Ekiga::PresenceCore> presence_core(new Ekiga::PresenceCore (details));

  service_core->add (contact_core);
  service_core->add (chat_core);
  service_core->add (friend_or_foe);
  service_core->add (videoinput_core);
  service_core->add (videooutput_core);
  service_core->add (audioinput_core);
  service_core->add (audiooutput_core);
  service_core->add (hal_core);
  service_core->add (call_core);
  service_core->add (account_core);
  service_core->add (details);
  service_core->add (presence_core);

  if (!videoinput_mlogo_init (*service_core, &argc, &argv)) {
    return;
  }

  if (!videooutput_clutter_gst_init (*service_core, &argc, &argv)) {
    return;
  }

  // THEN we use the kickstart scheme

  Ekiga::KickStart kickstart;

  audioinput_null_init (kickstart);
  audiooutput_null_init (kickstart);

  videoinput_ptlib_init (kickstart);

  audioinput_ptlib_init (kickstart);
  audiooutput_ptlib_init (kickstart);

#ifdef HAVE_GUDEV
  hal_gudev_init (kickstart);
#endif

#ifdef HAVE_DBUS
  hal_dbus_init (kickstart);
#endif

  opal_init (kickstart);

  history_init (kickstart);

  local_roster_init (kickstart);

  local_roster_bridge_init (kickstart);

  plugin_init (kickstart);

  // FIXME: Some parts in the kickstart need the gui.  The gui needs
  //  some parts in the kickstart.  So we will kick a first time to
  //  get things not needing the gui up and running, then start the
  //  gui (which will hence find what it needs) and kick a second time
  //  to really make the engine go vroom. It would be nicer to either
  //  push the parts needed by the gui in the hand-crafted part of
  //  this initialization, or put the gui in the kickstart too.

  kickstart.kick (*service_core, &argc, &argv);

  // FIXME: can't we have a single function for the whole gui?
  gtk_core_init (*service_core, &argc, &argv);

  if (!gtk_frontend_init (*service_core, &argc, &argv)) {

    return;
  }

  kickstart.kick (*service_core, &argc, &argv);

  /* FIXME: everything that follows except the debug output shouldn't
     be there, as that means we're doing the work of initializing
     those in the correct order here instead of having the specific
     code in question to do it itself
   */

  videoinput_core->setup ("any");
  audioinput_core->setup ();
  audiooutput_core->setup ();


  hal_core->videoinput_device_added.connect (boost::bind (&Ekiga::VideoInputCore::add_device, boost::ref (*videoinput_core), _1, _2, _3, _4));
  hal_core->videoinput_device_removed.connect (boost::bind (&Ekiga::VideoInputCore::remove_device, boost::ref (*videoinput_core), _1, _2, _3, _4));
  hal_core->audiooutput_device_added.connect (boost::bind (&Ekiga::AudioOutputCore::add_device, boost::ref (*audiooutput_core), _1, _2, _3));
  hal_core->audiooutput_device_removed.connect (boost::bind (&Ekiga::AudioOutputCore::remove_device, boost::ref (*audiooutput_core), _1, _2, _3));
  hal_core->audioinput_device_added.connect (boost::bind (&Ekiga::AudioInputCore::add_device, boost::ref (*audioinput_core), _1, _2, _3));
  hal_core->audioinput_device_removed.connect (boost::bind (&Ekiga::AudioInputCore::remove_device, boost::ref (*audioinput_core), _1, _2, _3));

#if DEBUG_STARTUP
  std::cout << "Here is what ekiga is made of for this run :" << std::endl;
  service_core->dump (std::cout);
#endif
}
Example #4
0
void
videoinput_ptlib_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new PTLIBVIDEOINPUTSpark);
  kickstart.add_spark (spark);
}
Example #5
0
void
audioinput_null_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new NULLAUDIOINPUTSpark);
  kickstart.add_spark (spark);
}
Example #6
0
void
opal_init (Ekiga::KickStart& kickstart)
{
  gmref_ptr<Ekiga::Spark> spark(new OPALSpark);
  kickstart.add_spark (spark);
}
Example #7
0
void
hal_dbus_init (Ekiga::KickStart& kickstart)
{
  gmref_ptr<Ekiga::Spark> spark(new HALDBUSSpark);
  kickstart.add_spark (spark);
}
Example #8
0
void
local_roster_bridge_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new LOCALROSTERBRIDGESpark);
  kickstart.add_spark (spark);
}
Example #9
0
void
audiooutput_ptlib_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new PTLIBAUDIOOUTPUTSpark);
  kickstart.add_spark (spark);
}
Example #10
0
void
history_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new HISTORYSpark);
  kickstart.add_spark (spark);
}
Example #11
0
void
hal_gudev_init (Ekiga::KickStart& kickstart)
{
  boost::shared_ptr<Ekiga::Spark> spark(new GUDevSpark);
  kickstart.add_spark (spark);
}
Example #12
0
void
history_init (Ekiga::KickStart& kickstart)
{
  gmref_ptr<Ekiga::Spark> spark(new HISTORYSpark);
  kickstart.add_spark (spark);
}