~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to liblightdm-qt/ldmgreeter.cpp

  • Committer: Robert Ancell
  • Date: 2011-05-05 06:11:16 UTC
  • Revision ID: robert.ancell@canonical.com-20110505061116-4nhrdw6k0huve3ek
Move user manager into liblightdm

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "ldmgreeter.h"
2
2
 
3
3
#include "powermanagementinterface.h"
4
 
#include "usermanagerinterface.h"
5
4
#include "consolekitinterface.h"
6
5
#include "ldmuser.h"
7
6
#include "ldmsession.h"
43
42
    int loginDelay;
44
43
 
45
44
    PowerManagementInterface* powerManagement;
46
 
    UserManagerInterface* userManager;
47
45
    ConsoleKitInterface* consoleKit;
48
46
  
49
47
    int toServerFd;
160
158
        busType = QDBusConnection::sessionBus();
161
159
    }
162
160
 
163
 
    d->userManager = new UserManagerInterface("org.lightdm.LightDisplayManager", "/org/lightdm/LightDisplayManager/Users", busType, this);
164
 
 
165
161
    char* fd = getenv("LDM_TO_SERVER_FD");
166
162
    if(!fd)
167
163
    {
390
386
 
391
387
QList<LdmUser> LdmGreeter::users() const
392
388
{
393
 
    QDBusPendingReply<QList<LdmUser> > users = d->userManager->GetUsers();
394
 
    users.waitForFinished();
395
 
    if (users.isValid())
396
 
    {
397
 
        return users.value();
398
 
    }
399
 
    else
400
 
    {
401
 
        qDebug() << users.error().name();
402
 
        qDebug() << users.error().message();
403
 
        return QList<LdmUser>();
404
 
    }
 
389
    // FIXME
405
390
}
406
391
 
407
392
QList<LdmSession> LdmGreeter::sessions() const