summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsc2000-12-30 22:45:48 +0000
committersc2000-12-30 22:45:48 +0000
commit13fffb63934984327e3daca40167a594351f140f (patch)
tree62ae064853ba42aad492d0758b7f1d4431183aed
parent5e1dff9dbae47f74232a9f775f799c75b4980d3a (diff)
downloadivy-league-13fffb63934984327e3daca40167a594351f140f.zip
ivy-league-13fffb63934984327e3daca40167a594351f140f.tar.gz
ivy-league-13fffb63934984327e3daca40167a594351f140f.tar.bz2
ivy-league-13fffb63934984327e3daca40167a594351f140f.tar.xz
Initial revision, created from bits of TextStream.h
-rw-r--r--comm/OLD/TextService.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/comm/OLD/TextService.h b/comm/OLD/TextService.h
new file mode 100644
index 0000000..f238d66
--- /dev/null
+++ b/comm/OLD/TextService.h
@@ -0,0 +1,62 @@
+/*
+ * The Unix Channel
+ *
+ * by Michel Beaudouin-Lafon
+ *
+ * Copyright 1990-1993
+ * Laboratoire de Recherche en Informatique (LRI)
+ *
+ * Text services
+ *
+ * $Id$
+ * $CurLog$
+ */
+
+#ifndef TextService_H_
+#define TextService_H_
+
+class UchTextService : public UchTextStream {
+friend class UchServiceStarter;
+
+public:
+enum status {
+ isUnavailable, // address not found in port server
+ isError, // could not init connection
+ isRunning, // connection established
+ isLost // no connection (auto-starting)
+ };
+
+protected:
+ status StatusFlag;
+ UchServiceStarter* Starter;
+ bool Closed;
+ CcuString User;
+ CcuString Service;
+ CcuString Host;
+
+ void Closing (bool);
+ void Flush ();
+ status Restart ();
+ void AutoStart (int = -1, int = -1);
+virtual void LostServer ();
+virtual void GotServer ();
+virtual void AbandonRestart ();
+ cmd_res Execute (const UchTextLine&);
+
+public:
+ UchTextService (UchBaseMultiplexer&, const char*, const char* = 0);
+ UchTextService ();
+ ~UchTextService ();
+ void Init (UchBaseMultiplexer&, const char*, const char* = 0);
+ status GetStatus () { return StatusFlag; }
+ int GetRetryTime ();
+ int GetMaxRetries ();
+ void Close (); // close after output buffer emptied
+ void CloseNow (); // close now
+
+};
+
+// the simplest interface to a server.
+extern bool TellServer (const char*, const char*, const char*);
+
+#endif