live
HandlerSet.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// Copyright (c) 1996-2024 Live Networks, Inc. All rights reserved.
17// Basic Usage Environment: for a simple, non-scripted, console application
18// C++ header
19
20#ifndef _HANDLER_SET_HH
21#define _HANDLER_SET_HH
22
23#ifndef _BOOLEAN_HH
24#include "Boolean.hh"
25#endif
26
28
32
33public:
38
39private:
40 // Descriptors are linked together in a doubly-linked list:
41 friend class HandlerSet;
42 friend class HandlerIterator;
45};
46
48public:
50 virtual ~HandlerSet();
51
52 void assignHandler(int socketNum, int conditionSet, TaskScheduler::BackgroundHandlerProc* handlerProc, void* clientData);
53 void clearHandler(int socketNum);
54 void moveHandler(int oldSocketNum, int newSocketNum);
55
56private:
58
59private:
60 friend class HandlerIterator;
62};
63
65public:
68
69 HandlerDescriptor* next(); // returns NULL if none
70 void reset();
71
72private:
75};
76
77#endif
TaskScheduler::BackgroundHandlerProc * handlerProc
Definition: HandlerSet.hh:36
virtual ~HandlerDescriptor()
HandlerDescriptor * fPrevHandler
Definition: HandlerSet.hh:44
HandlerDescriptor(HandlerDescriptor *nextHandler)
HandlerDescriptor * fNextHandler
Definition: HandlerSet.hh:43
HandlerIterator(HandlerSet &handlerSet)
HandlerSet & fOurSet
Definition: HandlerSet.hh:73
virtual ~HandlerIterator()
HandlerDescriptor * next()
HandlerDescriptor * fNextPtr
Definition: HandlerSet.hh:74
void moveHandler(int oldSocketNum, int newSocketNum)
virtual ~HandlerSet()
void clearHandler(int socketNum)
HandlerDescriptor fHandlers
Definition: HandlerSet.hh:61
HandlerDescriptor * lookupHandler(int socketNum)
void assignHandler(int socketNum, int conditionSet, TaskScheduler::BackgroundHandlerProc *handlerProc, void *clientData)
void BackgroundHandlerProc(void *clientData, int mask)