ProfileBackend::~ProfileBackend ()
{
#ifdef HAVE_LIBPROFILE
    profile_tracker_quit ();
#endif
    backend = 0;
}
Пример #2
0
static void unsubscribe_from_service(void)
{
    profile_track_remove_profile_cb(profile_name_change, NULL);
    profile_track_remove_active_cb(profile_value_change, NULL);

    profile_tracker_quit();
}
Пример #3
0
static int track(void)
{
  int        exit_code = EXIT_FAILURE;
  GMainLoop *mainloop  = g_main_loop_new(NULL, FALSE);

  profile_track_set_profile_cb(track_profile);
  profile_track_set_active_cb(track_active);
  profile_track_set_change_cb(track_change);

  profile_tracker_init();

  g_main_loop_run(mainloop);

  exit_code = EXIT_SUCCESS;

  profile_tracker_quit();

  if( mainloop != 0 )
  {
    g_main_loop_unref(mainloop);
    mainloop = 0;
  }

  return exit_code;
}
ProfileControl::~ProfileControl()
{
    s_instanceCounter--;
    if (s_instanceCounter == 0) {
        profile_tracker_quit();
    }

    profile_track_remove_profile_cb((profile_track_profile_fn_data) currentProfileChangedCallback, this);
    profile_track_remove_active_cb((profile_track_value_fn_data) &updateStateCallBackTrampoline, this);
    profile_track_remove_change_cb((profile_track_value_fn_data) &updateStateCallBackTrampoline, this);
}