summaryrefslogtreecommitdiffstats
path: root/remote-processor/Message.h
diff options
context:
space:
mode:
authorDavid Wagner <david.wagner@intel.com>2014-06-25 11:36:45 +0200
committerDavid Wagner <david.wagner@intel.com>2014-06-25 11:36:45 +0200
commitbf2f826f20b355f579ab8967ec38b794bbb2a868 (patch)
treee19fcfd40bca485acee5735a0a132f2575fd180a /remote-processor/Message.h
parentfb474cce72215e432308264ada9c5a7197a21125 (diff)
parent0fbd572ff8095725b47a69f08134d5efbc1336e8 (diff)
downloadexternal_parameter-framework-bf2f826f20b355f579ab8967ec38b794bbb2a868.zip
external_parameter-framework-bf2f826f20b355f579ab8967ec38b794bbb2a868.tar.gz
external_parameter-framework-bf2f826f20b355f579ab8967ec38b794bbb2a868.tar.bz2
Merge pull request #9 from 01org/dev-features
Realign from internal tree
Diffstat (limited to 'remote-processor/Message.h')
-rw-r--r--remote-processor/Message.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/remote-processor/Message.h b/remote-processor/Message.h
index 799a525..feafc83 100644
--- a/remote-processor/Message.h
+++ b/remote-processor/Message.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2011-2014, Intel Corporation
* All rights reserved.
*
@@ -43,8 +43,25 @@ public:
CMessage();
virtual ~CMessage();
- // Send/Receive
- bool serialize(CSocket* pSocket, bool bOut);
+ enum Result {
+ success,
+ peerDisconnected,
+ error
+ };
+
+ /** Write or read the message on pSocket.
+ *
+ * @param[in,out] pSocket is the socket on wich IO operation will be made.
+ * @param[in] bOut if true message should be read,
+ * if false it should be written.
+ * @param[out] strError on failure, a string explaining the error,
+ * on success, undefined.
+ *
+ * @return success if a correct message could be recv/send
+ * peerDisconnected if the peer disconnected before the first socket access.
+ * error if the message could not be read/write for any other reason
+ */
+ Result serialize(CSocket* pSocket, bool bOut, std::string &strError);
protected:
// Msg Id