mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 12:19:43 +00:00
Stub ServerInformation framework
This commit is contained in:
parent
c719e9983b
commit
50ad72b403
@ -0,0 +1 @@
|
||||
Versions/Current/Headers
|
@ -0,0 +1 @@
|
||||
../../../../../../../../../../../../src/private-frameworks/ServerInformation/include/ServerInformation
|
@ -0,0 +1 @@
|
||||
A
|
1
framework-include/ServerInformation
Symbolic link
1
framework-include/ServerInformation
Symbolic link
@ -0,0 +1 @@
|
||||
../Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ServerInformation.framework/Headers
|
@ -33,6 +33,7 @@ add_subdirectory(PerformanceAnalysis)
|
||||
add_subdirectory(PlugInKit)
|
||||
add_subdirectory(PowerLog)
|
||||
add_subdirectory(ProtocolBuffer)
|
||||
add_subdirectory(ServerInformation)
|
||||
add_subdirectory(SkyLight)
|
||||
add_subdirectory(Spotlight)
|
||||
add_subdirectory(SpotlightDaemon)
|
||||
|
20
src/private-frameworks/ServerInformation/CMakeLists.txt
Normal file
20
src/private-frameworks/ServerInformation/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
project(ServerInformation)
|
||||
|
||||
set(DYLIB_COMPAT_VERSION "1.0.0")
|
||||
set(DYLIB_CURRENT_VERSION "1.0.0")
|
||||
|
||||
add_framework(ServerInformation
|
||||
FAT
|
||||
CURRENT_VERSION
|
||||
PRIVATE
|
||||
VERSION "A"
|
||||
|
||||
SOURCES
|
||||
src/ServerInformation.m
|
||||
src/ServerInformationComputerModelInfo.m
|
||||
|
||||
DEPENDENCIES
|
||||
system
|
||||
objc
|
||||
Foundation
|
||||
)
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
This file is part of Darling.
|
||||
|
||||
Copyright (C) 2021 Lubos Dolezel
|
||||
|
||||
Darling 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ServerInformation_H_
|
||||
#define _ServerInformation_H_
|
||||
|
||||
#if __OBJC__
|
||||
#import <ServerInformation/ServerInformationComputerModelInfo.h>
|
||||
#endif
|
||||
|
||||
void* SICopyLocalizedServerProductName(void);
|
||||
void* SICopyMinimumServerVersion(void);
|
||||
void* SICopyServerBuildVersion(void);
|
||||
void* SICopyServerVersion(void);
|
||||
void* SIGetServerInstallPathPrefix(void);
|
||||
void* SIGetServerPerformanceModeEnabled(void);
|
||||
void* SIIsOSXServerVolume(void);
|
||||
void* SIIsOSXServerVolumeConfigured(void);
|
||||
void* SIIsServerHardware(void);
|
||||
void* SIIsXsanCapable(void);
|
||||
void* SISetServerPerformanceModeEnabled(void);
|
||||
void* _SIIsOSXVolumeVersionEqualToOrGreater(void);
|
||||
|
||||
#endif
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
This file is part of Darling.
|
||||
|
||||
Copyright (C) 2021 Lubos Dolezel
|
||||
|
||||
Darling 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@interface ServerInformationComputerModelInfo : NSObject
|
||||
|
||||
@end
|
102
src/private-frameworks/ServerInformation/src/ServerInformation.m
Normal file
102
src/private-frameworks/ServerInformation/src/ServerInformation.m
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
This file is part of Darling.
|
||||
|
||||
Copyright (C) 2021 Lubos Dolezel
|
||||
|
||||
Darling 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <ServerInformation/ServerInformation.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static int verbose = 0;
|
||||
|
||||
__attribute__((constructor))
|
||||
static void initme(void) {
|
||||
verbose = getenv("STUB_VERBOSE") != NULL;
|
||||
}
|
||||
|
||||
void* SICopyLocalizedServerProductName(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SICopyLocalizedServerProductName called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SICopyMinimumServerVersion(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SICopyMinimumServerVersion called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SICopyServerBuildVersion(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SICopyServerBuildVersion called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SICopyServerVersion(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SICopyServerVersion called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIGetServerInstallPathPrefix(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIGetServerInstallPathPrefix called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIGetServerPerformanceModeEnabled(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIGetServerPerformanceModeEnabled called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIIsOSXServerVolume(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIIsOSXServerVolume called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIIsOSXServerVolumeConfigured(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIIsOSXServerVolumeConfigured called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIIsServerHardware(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIIsServerHardware called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SIIsXsanCapable(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SIIsXsanCapable called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* SISetServerPerformanceModeEnabled(void)
|
||||
{
|
||||
if (verbose) puts("STUB: SISetServerPerformanceModeEnabled called");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* _SIIsOSXVolumeVersionEqualToOrGreater(void)
|
||||
{
|
||||
if (verbose) puts("STUB: _SIIsOSXVolumeVersionEqualToOrGreater called");
|
||||
return NULL;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
This file is part of Darling.
|
||||
|
||||
Copyright (C) 2021 Lubos Dolezel
|
||||
|
||||
Darling 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import <ServerInformation/ServerInformationComputerModelInfo.h>
|
||||
|
||||
@implementation ServerInformationComputerModelInfo
|
||||
|
||||
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
|
||||
{
|
||||
return [NSMethodSignature signatureWithObjCTypes: "v@:"];
|
||||
}
|
||||
|
||||
- (void)forwardInvocation:(NSInvocation *)anInvocation
|
||||
{
|
||||
NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue
Block a user