projects
/
framework
/
web
/
wrt-commons.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tizen 2.4 release
[framework/web/wrt-commons.git]
/
modules
/
rpc
/
src
/
generic_rpc_connection.cpp
diff --git
a/modules_wearable/rpc/src/generic_rpc_connection.cpp
b/modules/rpc/src/generic_rpc_connection.cpp
similarity index 88%
rename from
modules_wearable/rpc/src/generic_rpc_connection.cpp
rename to
modules/rpc/src/generic_rpc_connection.cpp
index
6b16f28
..
dbf790c
100644
(file)
--- a/
modules_wearable/rpc/src/generic_rpc_connection.cpp
+++ b/
modules/rpc/src/generic_rpc_connection.cpp
@@
-21,8
+21,7
@@
*/
#include <stddef.h>
#include <dpl/rpc/generic_rpc_connection.h>
*/
#include <stddef.h>
#include <dpl/rpc/generic_rpc_connection.h>
-#include <dpl/scoped_array.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
#include <dpl/aligned.h>
#include <stdexcept>
#include <dpl/aligned.h>
#include <stdexcept>
@@
-56,22
+55,22
@@
GenericRPCConnection::GenericRPCConnection(
AbstractWaitableInputOutput *inputOutput) :
m_inputOutput(inputOutput)
{
AbstractWaitableInputOutput *inputOutput) :
m_inputOutput(inputOutput)
{
-
LogPedantic
("Opening generic RPC...");
+
WrtLogD
("Opening generic RPC...");
WaitableInputOutputExecutionContextSupport::Open(inputOutput);
WaitableInputOutputExecutionContextSupport::Open(inputOutput);
-
LogPedantic
("Generic RPC opened");
+
WrtLogD
("Generic RPC opened");
}
GenericRPCConnection::~GenericRPCConnection()
{
// Ensure RPC is closed
}
GenericRPCConnection::~GenericRPCConnection()
{
// Ensure RPC is closed
-
LogPedantic
("Closing generic RPC...");
+
WrtLogD
("Closing generic RPC...");
WaitableInputOutputExecutionContextSupport::Close();
WaitableInputOutputExecutionContextSupport::Close();
-
LogPedantic
("Generic RPC closed");
+
WrtLogD
("Generic RPC closed");
}
void GenericRPCConnection::AsyncCall(const RPCFunction &function)
{
}
void GenericRPCConnection::AsyncCall(const RPCFunction &function)
{
-
LogPedantic
("Executing async call");
+
WrtLogD
("Executing async call");
// Create binary call
BinaryQueue serializedCall = function.Serialize();
// Create binary call
BinaryQueue serializedCall = function.Serialize();
@@
-98,7
+97,7
@@
void GenericRPCConnection::AsyncCall(const RPCFunction &function)
void GenericRPCConnection::Ping()
{
void GenericRPCConnection::Ping()
{
-
LogPedantic
("Executing ping call");
+
WrtLogD
("Executing ping call");
// Append buffers
Protocol::AsyncCall call;
// Append buffers
Protocol::AsyncCall call;
@@
-121,7
+120,7
@@
void GenericRPCConnection::Ping()
void GenericRPCConnection::OnInputStreamRead()
{
void GenericRPCConnection::OnInputStreamRead()
{
-
LogPedantic("Interpreting " << m_inputStream.Size() << " bytes buffer"
);
+
WrtLogD("Interpreting %i bytes buffer", m_inputStream.Size()
);
// Enough bytes to read at least one header ?
if (m_inputStream.Size() >= sizeof(Protocol::Header)) {
// Enough bytes to read at least one header ?
if (m_inputStream.Size() >= sizeof(Protocol::Header)) {
@@
-133,7
+132,7
@@
void GenericRPCConnection::OnInputStreamRead()
if (m_inputStream.Size() >= sizeof(Protocol::Header) +
header.size)
{
if (m_inputStream.Size() >= sizeof(Protocol::Header) +
header.size)
{
-
LogPedantic("Will parse packet of type: " <<
header.type);
+
WrtLogD("Will parse packet of type: %i",
header.type);
// Allocate new packet (header + real packet data)
void *binaryPacket = malloc(
// Allocate new packet (header + real packet data)
void *binaryPacket = malloc(
@@
-164,9
+163,7
@@
void GenericRPCConnection::OnInputStreamRead()
// ...but just remove protocol header
call.Consume(sizeof(Protocol::Header));
// ...but just remove protocol header
call.Consume(sizeof(Protocol::Header));
- LogPedantic(
- "Async call of size: " << header.size <<
- " parsed");
+ WrtLogD("Async call of size: %i parsed", header.size);
// Call async call event listeners
DPL::Event::EventSupport<AbstractRPCConnectionEvents::
// Call async call event listeners
DPL::Event::EventSupport<AbstractRPCConnectionEvents::
@@
-185,22
+182,22
@@
void GenericRPCConnection::OnInputStreamRead()
// Do not need packet data
free(binaryPacket);
// Do not need packet data
free(binaryPacket);
-
LogPedantic
("Ping pong replied");
+
WrtLogD
("Ping pong replied");
}
break;
default:
}
break;
default:
-
LogPedantic
("Warning: Unknown packet type");
+
WrtLogD
("Warning: Unknown packet type");
free(binaryPacket);
break;
}
} else {
free(binaryPacket);
break;
}
} else {
-
LogPedantic
("Too few bytes to read packet");
+
WrtLogD
("Too few bytes to read packet");
break;
}
}
} else {
break;
}
}
} else {
-
LogPedantic
("Too few bytes to read header");
+
WrtLogD
("Too few bytes to read header");
}
}
}
}