From 8e239366035f25d1a8ab4190ce0ec793007c6a66 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 13 Jun 2007 01:10:05 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1081 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SoObjects/SOGo/NSNull+Utilities.h | 36 +++++++++++++++++++++++++++++ SoObjects/SOGo/NSNull+Utilities.m | 34 +++++++++++++++++++++++++++ SoObjects/SOGo/NSNumber+Utilities.h | 36 +++++++++++++++++++++++++++++ SoObjects/SOGo/NSNumber+Utilities.m | 35 ++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+) create mode 100644 SoObjects/SOGo/NSNull+Utilities.h create mode 100644 SoObjects/SOGo/NSNull+Utilities.m create mode 100644 SoObjects/SOGo/NSNumber+Utilities.h create mode 100644 SoObjects/SOGo/NSNumber+Utilities.m diff --git a/SoObjects/SOGo/NSNull+Utilities.h b/SoObjects/SOGo/NSNull+Utilities.h new file mode 100644 index 00000000..736c0cf3 --- /dev/null +++ b/SoObjects/SOGo/NSNull+Utilities.h @@ -0,0 +1,36 @@ +/* NSNull+Utilities.h - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: 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 2, 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. + */ + +#ifndef NSNUMBER_URL_H +#define NSNUMBER_URL_H + +#import + +@class NSString; + +@interface NSNull (SOGoURLExtension) + +- (NSString *) jsonRepresentation; + +@end + +#endif /* NSNUMBER_URL_H */ diff --git a/SoObjects/SOGo/NSNull+Utilities.m b/SoObjects/SOGo/NSNull+Utilities.m new file mode 100644 index 00000000..68401dbb --- /dev/null +++ b/SoObjects/SOGo/NSNull+Utilities.m @@ -0,0 +1,34 @@ +/* NSNull+Utilities.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse group conseil + * + * Author: 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 2, 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. + */ + +#import + +#import "NSNull+Utilities.h" + +@implementation NSNull (SOGoURLExtension) + +- (NSString *) jsonRepresentation +{ + return @"null"; +} + +@end diff --git a/SoObjects/SOGo/NSNumber+Utilities.h b/SoObjects/SOGo/NSNumber+Utilities.h new file mode 100644 index 00000000..d63f1e4a --- /dev/null +++ b/SoObjects/SOGo/NSNumber+Utilities.h @@ -0,0 +1,36 @@ +/* NSNumber+Utilities.h - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: 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 2, 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. + */ + +#ifndef NSNUMBER_URL_H +#define NSNUMBER_URL_H + +#import + +@class NSString; + +@interface NSNumber (SOGoURLExtension) + +- (NSString *) jsonRepresentation; + +@end + +#endif /* NSNUMBER_URL_H */ diff --git a/SoObjects/SOGo/NSNumber+Utilities.m b/SoObjects/SOGo/NSNumber+Utilities.m new file mode 100644 index 00000000..d78d3650 --- /dev/null +++ b/SoObjects/SOGo/NSNumber+Utilities.m @@ -0,0 +1,35 @@ +/* NSNumber+Utilities.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse group conseil + * + * Author: 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 2, 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. + */ + +#import + +#import "NSNumber+Utilities.h" + +@implementation NSNumber (SOGoURLExtension) + +- (NSString *) jsonRepresentation +{ + + return [NSString stringWithFormat: @"%@", self]; +} + +@end -- 2.39.5