accounts-qt
1.13
|
00001 /* vi: set et sw=4 ts=4 cino=t0,(0: */ 00002 /* 00003 * This file is part of libaccounts-qt 00004 * 00005 * Copyright (C) 2009-2011 Nokia Corporation. 00006 * Copyright (C) 2012-2013 Canonical Ltd. 00007 * 00008 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public License 00012 * version 2.1 as published by the Free Software Foundation. 00013 * 00014 * This library is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00022 * 02110-1301 USA 00023 */ 00024 00025 #include "account.h" 00026 #include "manager.h" 00027 00028 #include <QHash> 00029 #include <QPointer> 00030 #include <libaccounts-glib/ag-manager.h> 00031 00032 namespace Accounts { 00033 00034 class Manager::Private 00035 { 00036 Q_DECLARE_PUBLIC(Manager) 00037 00038 public: 00039 Private(): 00040 q_ptr(0), 00041 m_manager(0) 00042 { 00043 } 00044 00045 ~Private() { 00046 } 00047 00048 void init(Manager *q, AgManager *manager); 00049 00050 mutable Manager *q_ptr; 00051 AgManager *m_manager; //real manager 00052 Error lastError; 00053 QHash<AccountId,QPointer<Account> > m_accounts; 00054 00055 static void on_account_created(Manager *self, AgAccountId id); 00056 static void on_account_deleted(Manager *self, AgAccountId id); 00057 static void on_account_updated(Manager *self, AgAccountId id); 00058 static void on_enabled_event(Manager *self, AgAccountId id); 00059 }; 00060 00061 } //namespace Accounts