aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rpcsfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rpcsfactory.h')
-rw-r--r--lib/rpcsfactory.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/rpcsfactory.h b/lib/rpcsfactory.h
index d57eb29..cc36f0d 100644
--- a/lib/rpcsfactory.h
+++ b/lib/rpcsfactory.h
@@ -11,6 +11,19 @@ class ppsocket;
*/
class rpcsfactory {
public:
+
+ /**
+ * The known errors which can happen during @ref create .
+ */
+ enum errs {
+ FACERR_NONE = 0,
+ FACERR_COULD_NOT_SEND = 1,
+ FACERR_AGAIN = 2,
+ FACERR_NOPSION = 3,
+ FACERR_PROTVERSION = 4,
+ FACERR_NORESPONSE = 5,
+ };
+
/**
* Constructs a rpcsfactory.
*
@@ -30,12 +43,21 @@ class rpcsfactory {
*/
virtual rpcs * create(bool reconnect);
+ /**
+ * Retrieve an error code.
+ *
+ * @returns The error code, in case @ref create has
+ * failed, 0 otherwise.
+ */
+ virtual Enum<errs> getError() { return err; }
+
private:
/**
* The socket to be used for connecting to the
* ncpd daemon.
*/
ppsocket *skt;
+ Enum<errs> err;
};
#endif