Permalink
Browse files

Fixed to allow adding ports other than the one's specified in code. A…

…dded a new speed called T1.
  • Loading branch information...
1 parent 7f06e11 commit c70815564407a03aa98b4b2878c41fa6f9893803 @mledford mledford committed Dec 1, 2009
Showing with 57 additions and 0 deletions.
  1. +20 −0 SLPort.h
  2. +37 −0 SLPort.m
View
@@ -0,0 +1,20 @@
+//
+// SLPort.h
+// speedlimit
+//
+// Created by Michael Ledford on 11/30/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SLPort : NSObject {
+ NSNumber *port;
+}
+
+@property (readwrite, retain) NSNumber *port;
+
+- (id)initWithPort:(int)portValue;
+
+@end
View
@@ -0,0 +1,37 @@
+//
+// SLPort.m
+// speedlimit
+//
+// Created by Michael Ledford on 11/30/09.
+// Copyright 2009 __MyCompanyName__. All rights reserved.
+//
+
+#import "SLPort.h"
+
+
+@implementation SLPort
+
+@synthesize port;
+
+- (id)initWithPort:(int)portValue
+{
+ self = [self init];
+
+ if (self != nil) {
+ if (!portValue) {
+ [self release];
+ return nil;
+ }
+ [self setPort:[NSNumber numberWithInt:portValue]];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [port release];
+ [super dealloc];
+}
+
+@end

0 comments on commit c708155

Please sign in to comment.