From c34f11fb7407594f7c1eb69b11f84a45d13cfa1a Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 24 四月 2017 11:55:11 +0800
Subject: [PATCH] 

---
 VisitFace/RtspNativeCodec/app/libs/live555/include/BasicUsageEnvironment/HandlerSet.hh |   77 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/libs/live555/include/BasicUsageEnvironment/HandlerSet.hh b/VisitFace/RtspNativeCodec/app/libs/live555/include/BasicUsageEnvironment/HandlerSet.hh
new file mode 100644
index 0000000..7824eb9
--- /dev/null
+++ b/VisitFace/RtspNativeCodec/app/libs/live555/include/BasicUsageEnvironment/HandlerSet.hh
@@ -0,0 +1,77 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 3 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+**********/
+// Copyright (c) 1996-2017 Live Networks, Inc.  All rights reserved.
+// Basic Usage Environment: for a simple, non-scripted, console application
+// C++ header
+
+#ifndef _HANDLER_SET_HH
+#define _HANDLER_SET_HH
+
+#ifndef _BOOLEAN_HH
+#include "Boolean.hh"
+#endif
+
+////////// HandlerSet (etc.) definition //////////
+
+class HandlerDescriptor {
+  HandlerDescriptor(HandlerDescriptor* nextHandler);
+  virtual ~HandlerDescriptor();
+
+public:
+  int socketNum;
+  int conditionSet;
+  TaskScheduler::BackgroundHandlerProc* handlerProc;
+  void* clientData;
+
+private:
+  // Descriptors are linked together in a doubly-linked list:
+  friend class HandlerSet;
+  friend class HandlerIterator;
+  HandlerDescriptor* fNextHandler;
+  HandlerDescriptor* fPrevHandler;
+};
+
+class HandlerSet {
+public:
+  HandlerSet();
+  virtual ~HandlerSet();
+
+  void assignHandler(int socketNum, int conditionSet, TaskScheduler::BackgroundHandlerProc* handlerProc, void* clientData);
+  void clearHandler(int socketNum);
+  void moveHandler(int oldSocketNum, int newSocketNum);
+
+private:
+  HandlerDescriptor* lookupHandler(int socketNum);
+
+private:
+  friend class HandlerIterator;
+  HandlerDescriptor fHandlers;
+};
+
+class HandlerIterator {
+public:
+  HandlerIterator(HandlerSet& handlerSet);
+  virtual ~HandlerIterator();
+
+  HandlerDescriptor* next(); // returns NULL if none
+  void reset();
+
+private:
+  HandlerSet& fOurSet;
+  HandlerDescriptor* fNextPtr;
+};
+
+#endif

--
Gitblit v1.8.0