CAPI removal
[platform/core/uifw/dali-core.git] / dali / public-api / signals / connection-tracker.h
1 #ifndef __DALI_CONNECTION_TRACKER_H__
2 #define __DALI_CONNECTION_TRACKER_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/common/vector-wrapper.h>
24 #include <dali/public-api/signals/connection-tracker-interface.h>
25
26 namespace Dali DALI_IMPORT_API
27 {
28
29 class CallbackBase;
30 class SlotObserver;
31 class SlotConnection;
32
33 /**
34  * @brief Connection tracker concrete implementation
35  */
36 class ConnectionTracker : public ConnectionTrackerInterface
37 {
38 public:
39
40   /**
41    * @brief Constructor.
42    */
43   ConnectionTracker();
44
45   /**
46    * @brief Virtual destructor.
47    */
48   virtual ~ConnectionTracker();
49
50   /**
51    * @brief Disconnect all signals from this object.
52    */
53   void DisconnectAll();
54
55   /**
56    * @copydoc ConnectionTrackerInterface::SignalConnected
57    */
58   virtual void SignalConnected( SlotObserver* slotObserver, CallbackBase* callback );
59
60   /**
61    * @copydoc ConnectionTrackerInterface::SignalDisconnected
62    */
63   virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback );
64
65   /**
66    * @copydoc ConnectionTrackerInterface::GetConnectionCount
67    */
68   virtual std::size_t GetConnectionCount() const;
69
70 private:
71
72   ConnectionTracker( const ConnectionTracker& );            ///< undefined copy constructor
73   ConnectionTracker& operator=( const ConnectionTracker& ); ///< undefined assignment operator
74
75 private:
76
77   std::vector< SlotConnection* > mConnections; ///< Vector of connection pointers
78 };
79
80 } // namespace Dali
81
82 #endif // __DALI_CONNECTION_TRACKER_H__