~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to tests/backend-dbus/mock-accounts.cc

  • Committer: Charles Kerr
  • Date: 2013-03-23 15:04:13 UTC
  • mto: (384.2.29 ng)
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130323150413-t6m9gke6lmxx8b9i
use pete woods' hud cmake code for the build.sh script to check for Ninja and to move the gdbus-codegen macros into a resuable file in the cmake/ directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
}
71
71
 
72
72
MockUser *
 
73
MockAccounts :: find_by_path (const char * path)
 
74
{
 
75
  const path_to_user_t::iterator it (my_path_to_user.find(path));
 
76
 
 
77
  if (it != my_path_to_user.end())
 
78
    return it->second;
 
79
 
 
80
  g_warn_if_reached ();
 
81
  return 0;
 
82
}
 
83
 
 
84
MockUser *
73
85
MockAccounts :: find_by_username (const char * username)
74
86
{
75
87
  const username_to_user_t::iterator it (my_username_to_user.find(username));
107
119
 
108
120
  i = 0;
109
121
  paths = g_new0 (const char*, users.size() + 1);
110
 
  for (auto it : users)
111
 
    paths[i++] = it->path();
 
122
  for (users_t::iterator it(users.begin()),
 
123
                        end(users.end()); it!=end; ++it)
 
124
   paths[i++] = (*it)->path();
112
125
  accounts_complete_list_cached_users (a, invocation, paths);
113
126
  g_free (paths);
114
127