oc/utils: Move OCDumpPListData() function into plreader - this is the only user for this function
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>pull/49/head
parent
bf0f2a76d5
commit
116e738e63
|
@ -139,46 +139,3 @@ const char *indentationStep = " ";
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
static void
|
|
||||||
OCDumpPListData (NSData *content)
|
|
||||||
{
|
|
||||||
//NSDictionary *d;
|
|
||||||
//NSPropertyListFormat format;
|
|
||||||
//NSString *error = nil;
|
|
||||||
//const char *formatName;
|
|
||||||
|
|
||||||
//d = [NSPropertyListSerialization propertyListFromData: content
|
|
||||||
// mutabilityOption: NSPropertyListImmutable
|
|
||||||
// format: &format
|
|
||||||
// errorDescription: &error];
|
|
||||||
//d = [content BSONValue];
|
|
||||||
|
|
||||||
// if (d)
|
|
||||||
// {
|
|
||||||
// switch (format)
|
|
||||||
// {
|
|
||||||
// case NSPropertyListOpenStepFormat:
|
|
||||||
// formatName = "OpenStep";
|
|
||||||
// break;
|
|
||||||
// case NSPropertyListXMLFormat_v1_0:
|
|
||||||
// formatName = "XML";
|
|
||||||
// break;
|
|
||||||
// case NSPropertyListBinaryFormat_v1_0:
|
|
||||||
// formatName = "Binary";
|
|
||||||
// break;
|
|
||||||
// case NSPropertyListGNUstepFormat:
|
|
||||||
// formatName = "GNUstep";
|
|
||||||
// break;
|
|
||||||
// case NSPropertyListGNUstepBinaryFormat:
|
|
||||||
// formatName = "GNUstep binary";
|
|
||||||
// break;
|
|
||||||
// default: formatName = "unknown";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// printf ("File format is: %s\n", formatName);
|
|
||||||
// [d displayWithIndentation: 0];
|
|
||||||
// printf ("\n");
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// printf ("an error occurred: %s\n", [error UTF8String]);
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,6 +29,50 @@
|
||||||
|
|
||||||
#import "NSObject+PropertyList.m"
|
#import "NSObject+PropertyList.m"
|
||||||
|
|
||||||
|
static void
|
||||||
|
OCDumpPListData (NSData *content)
|
||||||
|
{
|
||||||
|
//NSDictionary *d;
|
||||||
|
//NSPropertyListFormat format;
|
||||||
|
//NSString *error = nil;
|
||||||
|
//const char *formatName;
|
||||||
|
|
||||||
|
//d = [NSPropertyListSerialization propertyListFromData: content
|
||||||
|
// mutabilityOption: NSPropertyListImmutable
|
||||||
|
// format: &format
|
||||||
|
// errorDescription: &error];
|
||||||
|
//d = [content BSONValue];
|
||||||
|
|
||||||
|
// if (d)
|
||||||
|
// {
|
||||||
|
// switch (format)
|
||||||
|
// {
|
||||||
|
// case NSPropertyListOpenStepFormat:
|
||||||
|
// formatName = "OpenStep";
|
||||||
|
// break;
|
||||||
|
// case NSPropertyListXMLFormat_v1_0:
|
||||||
|
// formatName = "XML";
|
||||||
|
// break;
|
||||||
|
// case NSPropertyListBinaryFormat_v1_0:
|
||||||
|
// formatName = "Binary";
|
||||||
|
// break;
|
||||||
|
// case NSPropertyListGNUstepFormat:
|
||||||
|
// formatName = "GNUstep";
|
||||||
|
// break;
|
||||||
|
// case NSPropertyListGNUstepBinaryFormat:
|
||||||
|
// formatName = "GNUstep binary";
|
||||||
|
// break;
|
||||||
|
// default: formatName = "unknown";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// printf ("File format is: %s\n", formatName);
|
||||||
|
// [d displayWithIndentation: 0];
|
||||||
|
// printf ("\n");
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// printf ("an error occurred: %s\n", [error UTF8String]);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PLReaderDumpPListFile (NSString *filename)
|
PLReaderDumpPListFile (NSString *filename)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue