plptools
Loading...
Searching...
No Matches
rpcsfactory.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5 * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * along with this program; if not, see <https://www.gnu.org/licenses/>.
19 *
20 */
21#ifndef _RPCSFACTORY_H_
22#define _RPCSFACTORY_H_
23
24#include "rpcs.h"
25
26class TCPSocket;
27
33 public:
34
38 enum errs {
45 };
46
54
64 virtual rpcs * create(bool reconnect);
65
72 virtual Enum<errs> getError() { return err; }
73
74 private:
81};
82
83#endif
Wrapper class featuring range-checking and string representation of enumerated values.
Definition: Enum.h:136
A class for dealing with sockets.
Definition: tcpsocket.h:38
Remote procedure call services via PLP.
Definition: rpcs.h:51
A factory for automatically instantiating the correct protocol variant depending on the connected Psi...
Definition: rpcsfactory.h:32
virtual rpcs * create(bool reconnect)
Creates a new rpcs instance.
Definition: rpcsfactory.cc:47
errs
The known errors which can happen during create .
Definition: rpcsfactory.h:38
@ FACERR_PROTVERSION
Definition: rpcsfactory.h:43
@ FACERR_NORESPONSE
Definition: rpcsfactory.h:44
@ FACERR_COULD_NOT_SEND
Definition: rpcsfactory.h:40
TCPSocket * skt
The socket to be used for connecting to the ncpd daemon.
Definition: rpcsfactory.h:79
virtual Enum< errs > getError()
Retrieve an error code.
Definition: rpcsfactory.h:72
Enum< errs > err
Definition: rpcsfactory.h:80