From 86e54989fbba8997eb41eb0b1b84fd2f10faa0b7 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 20 Jun 2014 03:23:38 +0200 Subject: [PATCH] oc/utils: Make "plext" category publicly visible Signed-off-by: Kamen Mazdrashki --- OpenChange/NSObject+PropertyList.h | 64 ++++++++++++++++++++++++++++++ OpenChange/NSObject+PropertyList.m | 6 +-- 2 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 OpenChange/NSObject+PropertyList.h diff --git a/OpenChange/NSObject+PropertyList.h b/OpenChange/NSObject+PropertyList.h new file mode 100644 index 000000000..34ea28ea8 --- /dev/null +++ b/OpenChange/NSObject+PropertyList.h @@ -0,0 +1,64 @@ +/* dbmsgdump.m - this file is part of SOGo + * + * Copyright (C) 2014 Kamen Mazdrashki + * + * Based on implementation done by Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This file 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * A format-agnostic dump extensions for: + * NSArray + * NSObject + * NSDictionary + */ + +#ifndef NSOBJECT_PROPERTYLIST_H +#define NSOBJECT_PROPERTYLIST_H + +#import +#import +#import + + +@interface NSObject (plext) + +- (void) displayWithIndentation: (NSInteger) anInt; + +@end + + +@interface NSDictionary (plext) + +- (void) displayKey: (NSString *) key + withIndentation: (NSInteger) anInt; + +- (void) displayWithIndentation: (NSInteger) anInt; + +@end + + +@interface NSArray (plext) + +- (void) displayCount: (NSUInteger) count + withIndentation: (NSInteger) anInt; + +- (void) displayWithIndentation: (NSInteger) anInt; + +@end + +#endif /* NSOBJECT_PROPERTYLIST_H */ diff --git a/OpenChange/NSObject+PropertyList.m b/OpenChange/NSObject+PropertyList.m index 08fcd01f6..164ac5054 100644 --- a/OpenChange/NSObject+PropertyList.m +++ b/OpenChange/NSObject+PropertyList.m @@ -32,14 +32,10 @@ #import #import +#import "NSObject+PropertyList.h" const char *indentationStep = " "; -@interface NSObject (plext) - -- (void) displayWithIndentation: (NSInteger) anInt; - -@end @implementation NSObject (plext)