Dali 3D User Interface Engine
network-performance-client.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_ADAPTOR_NETWORK_PERFORMANCE_CLIENT_H__
2 #define __DALI_INTERNAL_ADAPTOR_NETWORK_PERFORMANCE_CLIENT_H__
3 
4 /*
5  * Copyright (c) 2015 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 // EXTERNAL INCLUDES
22 #include <pthread.h>
23 
24 // INTERNAL INCLUDES
26 #include <trigger-event-factory-interface.h>
29 
30 
31 namespace Dali
32 {
33 
34 namespace Internal
35 {
36 
37 namespace Adaptor
38 {
39 
59 {
60 public:
61 
71  NetworkPerformanceClient( pthread_t* thread,
72  SocketInterface *socket,
73  unsigned int clientId,
74  TriggerEventFactoryInterface& triggerEventFactory,
75  ClientSendDataInterface& sendDataInterface,
76  SocketFactoryInterface& socketFactory );
77 
82 
86  unsigned int GetId() const;
87 
92 
97  bool WriteSocket( const void* buffer, unsigned int bufferSizeInBytes );
98 
104  void ProcessCommand( char* buffer, unsigned int bufferSizeInBytes );
105 
110  bool TransmitMarker( const PerformanceMarker& marker, const char* const description );
111 
116  void ExitSelect();
117 
122  pthread_t* GetThread();
123 
124 private:
125 
126  pthread_t* mThread;
129  TriggerEventFactoryInterface& mTriggerEventFactory;
132  unsigned int mClientId;
134 
135 };
136 
137 
138 } // namespace Internal
139 
140 } // namespace Adaptor
141 
142 } // namespace Dali
143 
144 #endif
Dali Docs Home
Read more about Dali