Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2010-04-17 19:37:03 +0400
committerMikkel Krautz <mikkel@krautz.dk>2010-04-17 19:37:03 +0400
commit4481edb713c780ef6969764083aa4f842e40d58f (patch)
tree7f243b4f2b60db5ae206d5841cdab6b87ed32a61 /src/MulticastDelegate.h
parentf6d1a38392e8c27dd8105a1d07f415923f76a0f0 (diff)
Implement more MKMessageHandler methods in MKServerModel, also add multicast delegation.
Diffstat (limited to 'src/MulticastDelegate.h')
-rw-r--r--src/MulticastDelegate.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/MulticastDelegate.h b/src/MulticastDelegate.h
new file mode 100644
index 0000000..67dea4c
--- /dev/null
+++ b/src/MulticastDelegate.h
@@ -0,0 +1,69 @@
+/*
+ * Software License Agreement (BSD License)
+ *
+ * Copyright (c) 2007, Deusty Designs, LLC
+ * All rights reserved.
+ *
+ * Redistribution and use of this software in source and binary forms,
+ * with or without modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the
+ * following disclaimer.
+ *
+ * Neither the name of Desuty Designs nor the names of its
+ * contributors may be used to endorse or promote products
+ * derived from this software without specific prior
+ * written permission of Deusty Designs, LLC.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class MulticastDelegateEnumerator;
+
+struct MulticastDelegateListNode {
+ id delegate;
+ struct MulticastDelegateListNode * prev;
+ struct MulticastDelegateListNode * next;
+ NSUInteger retainCount;
+};
+typedef struct MulticastDelegateListNode MulticastDelegateListNode;
+
+
+@interface MulticastDelegate : NSObject
+{
+ MulticastDelegateListNode *delegateList;
+}
+
+- (void)addDelegate:(id)delegate;
+- (void)removeDelegate:(id)delegate;
+
+- (void)removeAllDelegates;
+
+- (NSUInteger)count;
+
+- (MulticastDelegateEnumerator *)delegateEnumerator;
+
+@end
+
+@interface MulticastDelegateEnumerator : NSObject
+{
+ NSUInteger numDelegates;
+ NSUInteger currentDelegateIndex;
+ MulticastDelegateListNode **delegates;
+}
+
+- (id)nextDelegate;
+- (id)nextDelegateOfClass:(Class)aClass;
+- (id)nextDelegateForSelector:(SEL)aSelector;
+
+@end