CoreServices fixes

This commit is contained in:
Andrew Hyatt 2019-04-05 13:51:55 -04:00
parent 1c7055cf6b
commit 7d7f66cabc
4 changed files with 31 additions and 7 deletions

View File

@ -46,7 +46,9 @@ set(CoreServices_SRCS
LSApplicationProxy.m LSApplicationProxy.m
LSApplicationWorkspace.m LSApplicationWorkspace.m
constants.m constants.m
src/FSEvents.c src/FSEvents.c
src/LaunchServices.c
) )
if (WITH_COREAUDIO) if (WITH_COREAUDIO)

View File

@ -112,12 +112,6 @@ int execvpe(const char* name, char** argv, char** envp)
return ret; return ret;
} }
OSStatus LSRegisterURL(CFURLRef inURL, Boolean inUpdate)
{
printf("STUB: LSRegisterURL");
return 0;
}
OSStatus LSOpenApplication(const LSApplicationParameters *appParams, ProcessSerialNumber *outPSN) OSStatus LSOpenApplication(const LSApplicationParameters *appParams, ProcessSerialNumber *outPSN)
{ {
if (!appParams) if (!appParams)

View File

@ -39,7 +39,7 @@ FSEventStreamRef FSEventStreamCreate(
printf("STUB %s\n", __PRETTY_FUNCTION__); printf("STUB %s\n", __PRETTY_FUNCTION__);
stream = CFAllocatorAllocate(allocator, sizeof(struct __FSEventStream), 0); stream = CFAllocatorAllocate(allocator, sizeof(struct __FSEventStream), 0);
stream->allocator = allocator; stream->allocator = allocator;
stream->pathsToWatch = pathsToWatch; stream->pathsToWatch = CFArrayCreateCopy(allocator, pathsToWatch);
return stream; return stream;
} }

View File

@ -0,0 +1,28 @@
/*
This file is part of Darling.
Copyright (C) 2019 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 <LaunchServices/LaunchServices.h>
#include <stdio.h>
#include <stdlib.h>
OSStatus LSRegisterURL(CFURLRef inURL, Boolean inUpdate)
{
printf("STUB: LSRegisterURL\n");
return 0;
}