···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2021 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _ServerInformation_H_
2222+#define _ServerInformation_H_
2323+2424+#if __OBJC__
2525+#import <ServerInformation/ServerInformationComputerModelInfo.h>
2626+#endif
2727+2828+void* SICopyLocalizedServerProductName(void);
2929+void* SICopyMinimumServerVersion(void);
3030+void* SICopyServerBuildVersion(void);
3131+void* SICopyServerVersion(void);
3232+void* SIGetServerInstallPathPrefix(void);
3333+void* SIGetServerPerformanceModeEnabled(void);
3434+void* SIIsOSXServerVolume(void);
3535+void* SIIsOSXServerVolumeConfigured(void);
3636+void* SIIsServerHardware(void);
3737+void* SIIsXsanCapable(void);
3838+void* SISetServerPerformanceModeEnabled(void);
3939+void* _SIIsOSXVolumeVersionEqualToOrGreater(void);
4040+4141+#endif
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2021 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#include <Foundation/Foundation.h>
2121+2222+@interface ServerInformationComputerModelInfo : NSObject
2323+2424+@end
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2021 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#include <ServerInformation/ServerInformation.h>
2222+#include <stdlib.h>
2323+#include <stdio.h>
2424+2525+static int verbose = 0;
2626+2727+__attribute__((constructor))
2828+static void initme(void) {
2929+ verbose = getenv("STUB_VERBOSE") != NULL;
3030+}
3131+3232+void* SICopyLocalizedServerProductName(void)
3333+{
3434+ if (verbose) puts("STUB: SICopyLocalizedServerProductName called");
3535+ return NULL;
3636+}
3737+3838+void* SICopyMinimumServerVersion(void)
3939+{
4040+ if (verbose) puts("STUB: SICopyMinimumServerVersion called");
4141+ return NULL;
4242+}
4343+4444+void* SICopyServerBuildVersion(void)
4545+{
4646+ if (verbose) puts("STUB: SICopyServerBuildVersion called");
4747+ return NULL;
4848+}
4949+5050+void* SICopyServerVersion(void)
5151+{
5252+ if (verbose) puts("STUB: SICopyServerVersion called");
5353+ return NULL;
5454+}
5555+5656+void* SIGetServerInstallPathPrefix(void)
5757+{
5858+ if (verbose) puts("STUB: SIGetServerInstallPathPrefix called");
5959+ return NULL;
6060+}
6161+6262+void* SIGetServerPerformanceModeEnabled(void)
6363+{
6464+ if (verbose) puts("STUB: SIGetServerPerformanceModeEnabled called");
6565+ return NULL;
6666+}
6767+6868+void* SIIsOSXServerVolume(void)
6969+{
7070+ if (verbose) puts("STUB: SIIsOSXServerVolume called");
7171+ return NULL;
7272+}
7373+7474+void* SIIsOSXServerVolumeConfigured(void)
7575+{
7676+ if (verbose) puts("STUB: SIIsOSXServerVolumeConfigured called");
7777+ return NULL;
7878+}
7979+8080+void* SIIsServerHardware(void)
8181+{
8282+ if (verbose) puts("STUB: SIIsServerHardware called");
8383+ return NULL;
8484+}
8585+8686+void* SIIsXsanCapable(void)
8787+{
8888+ if (verbose) puts("STUB: SIIsXsanCapable called");
8989+ return NULL;
9090+}
9191+9292+void* SISetServerPerformanceModeEnabled(void)
9393+{
9494+ if (verbose) puts("STUB: SISetServerPerformanceModeEnabled called");
9595+ return NULL;
9696+}
9797+9898+void* _SIIsOSXVolumeVersionEqualToOrGreater(void)
9999+{
100100+ if (verbose) puts("STUB: _SIIsOSXVolumeVersionEqualToOrGreater called");
101101+ return NULL;
102102+}
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2021 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#import <ServerInformation/ServerInformationComputerModelInfo.h>
2121+2222+@implementation ServerInformationComputerModelInfo
2323+2424+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
2525+{
2626+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
2727+}
2828+2929+- (void)forwardInvocation:(NSInvocation *)anInvocation
3030+{
3131+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
3232+}
3333+3434+@end