This commit is contained in:
Hivert Quentin
2024-03-18 15:25:07 +01:00
parent 9954c3607b
commit 6bbe8100b9
10 changed files with 188 additions and 18 deletions

25
API/GNUmakefile Normal file
View File

@@ -0,0 +1,25 @@
# GNUstep makefile
include common.make
BUNDLE_NAME = API
API_PRINCIPAL_CLASS = SOGoAPIProduct
API_OBJC_FILES = \
SOGoAPIProduct.m \
SOGoAPI.m
API_RESOURCE_FILES += \
product.plist
API_LANGUAGES = $(SOGO_LANGUAGES)
API_LOCALIZED_RESOURCE_FILES = Localizable.strings
ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -I../SoObjects/
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble

16
API/GNUmakefile.preamble Normal file
View File

@@ -0,0 +1,16 @@
# compile settings
ADDITIONAL_CPPFLAGS += \
-DSOGO_MAJOR_VERSION=$(MAJOR_VERSION) \
-DSOGO_MINOR_VERSION=$(MINOR_VERSION) \
-DSOGO_PATCH_VERSION=$(SUBMINOR_VERSION) \
-DSOGO_LIBDIR="@\"$(SOGO_LIBDIR)\""
ADDITIONAL_INCLUDE_DIRS += \
-D_GNU_SOURCE -I../SOPE/ -I../SoObjects/
ADDITIONAL_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/sogo -lSOGo \
-L../SOPE/GDLContentStore/$(GNUSTEP_OBJ_DIR)/ -lGDLContentStore \
-L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ -lNGCards \
-lEOControl -lNGStreams -lNGMime -lNGExtensions -lNGObjWeb -lWEExtensions

28
API/SOGoAPI.h Normal file
View File

@@ -0,0 +1,28 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/Foundation.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSDictionary.h>
@interface SOGoAPI : NSObject
- (NSDictionary *) sogoVersionAction;
@end

23
API/SOGoAPI.m Normal file
View File

@@ -0,0 +1,23 @@
/*
Copyright (C) todo...
*/
#import <SOGoAPI.h>
@implementation SOGoAPI
- (NSDictionary *) sogoVersionAction {
NSDictionary* result;
result = [[NSDictionary alloc] initWithObjectsAndKeys:
@"major", SOGO_MAJOR_VERSION,
@"minor", SOGO_MINOR_VERSION,
@"patch", SOGO_PATCH_VERSION,
nil];
[result autorelease];
return result;
}
@end /* SOGoAPI */

11
API/SOGoAPIProduct.m Normal file
View File

@@ -0,0 +1,11 @@
/*
Copyright (C) todo...
*/
#import <Foundation/NSObject.h>
@interface SOGoAPIProduct : NSObject
@end
@implementation SOGoAPIProduct
@end /* SOGoAPIProduct */

34
API/common.make Normal file
View File

@@ -0,0 +1,34 @@
include ../config.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
NEEDS_GUI=no
BUNDLE_EXTENSION = .SOGo
BUNDLE_INSTALL_DIR = $(SOGO_LIBDIR)
WOBUNDLE_EXTENSION = $(BUNDLE_EXTENSION)
WOBUNDLE_INSTALL_DIR = $(BUNDLE_INSTALL_DIR)
# SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib
ADDITIONAL_INCLUDE_DIRS += \
-I.. \
-I../.. \
-I../../SOPE
ADDITIONAL_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/Versions/Current/sogo \
-L../SoObjects/SOGo/$(GNUSTEP_OBJ_DIR)/ \
-L../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ \
-L/usr/local/lib \
-Wl,-rpath,$(SOGO_SYSLIBDIR)/sogo
BUNDLE_LIBS += \
-lSOGo \
-lGDLContentStore \
-lGDLAccess \
-lNGObjWeb \
-lNGCards -lNGMime -lNGLdap \
-lNGStreams -lNGExtensions -lEOControl \
-lDOM -lSaxObjC -lSBJson
ADDITIONAL_BUNDLE_LIBS += $(BUNDLE_LIBS)

31
API/product.plist Normal file
View File

@@ -0,0 +1,31 @@
{
requires = ( MAIN, Appointments, Contacts, Mailer );
publicResources = ();
factories = {};
classes = {
SOGoAPI = {
protectedBy = "<public>";
defaultRoles = {
"View" = ( "Authenticated", "PublicUser" );
};
};
};
categories = {
SOGoAPI = {
slots = {
};
methods = {
Version = {
protectedBy = "View";
pageName = "SOGoAPI";
actionName = "sogoVersion";
};
};
};
};
}