Skip to content
Snippets Groups Projects
Select Git revision
  • 61a88862bcde787cefe7f58c48d04e5254dbd743
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/releaseTest
  • release/releaseWindowsTest
  • release/windowsReleaseTest
  • release/201910
  • release/qt/201910
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • 1.0.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
26 results

account.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    account.cpp 60.33 KiB
    /****************************************************************************
     *   Copyright (C) 2009-2015 by Savoir-Faire Linux                          *
     *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>          *
     *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
     *                                                                          *
     *   This library is free software; you can redistribute it and/or          *
     *   modify it under the terms of the GNU Lesser General Public             *
     *   License as published by the Free Software Foundation; either           *
     *   version 2.1 of the License, or (at your option) any later version.     *
     *                                                                          *
     *   This library is distributed in the hope that it will be useful,        *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *
     *   Lesser General Public License for more details.                        *
     *                                                                          *
     *   You should have received a copy of the GNU General Public License      *
     *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
     ***************************************************************************/
    
    //Parent
    #include "account.h"
    
    //Qt
    #include <QtCore/QDebug>
    #include <QtCore/QObject>
    #include <QtCore/QString>
    
    //Ring daemon
    #include <account_const.h>
    
    //Ring lib
    #include "dbus/configurationmanager.h"
    #include "dbus/callmanager.h"
    #include "dbus/videomanager.h"
    #include "delegates/accountlistcolordelegate.h"
    #include "certificate.h"
    #include "certificatemodel.h"
    #include "accountmodel.h"
    #include "private/account_p.h"
    #include "private/accountmodel_p.h"
    #include "credentialmodel.h"
    #include "ciphermodel.h"
    #include "protocolmodel.h"
    #include "bootstrapmodel.h"
    #include "accountstatusmodel.h"
    #include "codecmodel.h"
    #include "ringtonemodel.h"
    #include "contactmethod.h"
    #include "phonedirectorymodel.h"
    #include "presencestatusmodel.h"
    #include "uri.h"
    #include "securityvalidationmodel.h"
    #define TO_BOOL ?"true":"false"
    #define IS_TRUE == "true"
    
    #define AP &AccountPrivate
    const account_function AccountPrivate::stateMachineActionsOnState[6][7] = {
    /*               NOTHING        EDIT         RELOAD        SAVE        REMOVE      MODIFY         CANCEL       */
    /*READY    */{ AP::nothing, AP::edit   , AP::reload , AP::nothing, AP::remove , AP::modify   , AP::nothing },/**/
    /*EDITING  */{ AP::nothing, AP::nothing, AP::outdate, AP::nothing, AP::remove , AP::modify   , AP::cancel  },/**/
    /*OUTDATED */{ AP::nothing, AP::nothing, AP::nothing, AP::nothing, AP::remove , AP::reloadMod, AP::reload  },/**/
    /*NEW      */{ AP::nothing, AP::nothing, AP::nothing, AP::save   , AP::remove , AP::nothing  , AP::nothing },/**/
    /*MODIFIED */{ AP::nothing, AP::nothing, AP::nothing, AP::save   , AP::remove , AP::nothing  , AP::reload  },/**/
    /*REMOVED  */{ AP::nothing, AP::nothing, AP::nothing, AP::nothing, AP::nothing, AP::nothing  , AP::cancel  } /**/
    /*                                                                                                                                                       */
    };
    #undef AP
    
    AccountPrivate::AccountPrivate(Account* acc) : QObject(acc),q_ptr(acc),m_pCredentials(nullptr),m_pCodecModel(nullptr),
    m_LastErrorCode(-1),m_VoiceMailCount(0),m_pRingToneModel(nullptr),