Skip to content
Snippets Groups Projects
Select Git revision
  • a775bea90282c32292b4be3a9502b32eca24fefe
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/windowsReleaseTest
  • release/releaseTest
  • release/releaseWindowsTest
  • 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
  • 4.0.0
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
31 results

manager.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    behaviorcontroller.h 2.46 KiB
    /****************************************************************************
     *   Copyright (C) 2017-2018 Savoir-faire Linux                                  *
     *   Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>             *
     *   Author: Sébastien Blin <sebastien.blin@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/>.  *
     ***************************************************************************/
    #pragma once
    
    // Std
    #include <memory>
    
    // Qt
    #include <qobject.h>
    
    // Lrc
    #include "typedefs.h"
    
    namespace lrc
    {
    
    class BehaviorControllerPimpl;
    
    namespace api
    {
    class Lrc;
    
    namespace conversation
    {
        class Info;
    }
    
    /**
      *  @brief Class that helps to control behaviors from the client side.
      *  @note This class must only refer to the common behaviors.
      */
    class LIB_EXPORT BehaviorController : public QObject {
        Q_OBJECT
    
    public:
        BehaviorController();
        ~BehaviorController();
    
    Q_SIGNALS:
        /**
         * Emitted when the client should open the chat view.
         */
        void showChatView(const std::string& accountId, const api::conversation::Info& conversationInfo) const;
        /**
         * Emitted when the client should open the call view.
         */
        void showCallView(const std::string& accountId, const api::conversation::Info& conversationInfo) const;
        /**
         * Emitted when the client should open the incoming call view.
         */
        void showIncomingCallView(const std::string& accountId, const api::conversation::Info& conversationInfo) const;
    };
    
    } // namespace api
    } // namespace lrc