mirror of
https://github.com/darlinghq/darling-libxpc.git
synced 2024-11-23 03:39:40 +00:00
Add license headers everywhere and fix small issues
This commit is contained in:
parent
0ec7a91082
commit
efee6f689e
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _OS_TRANSACTION_PRIVATE_H_
|
||||
#define _OS_TRANSACTION_PRIVATE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 XPC_PRIVATE_H_
|
||||
#define XPC_PRIVATE_H_
|
||||
|
||||
@ -14,31 +33,12 @@
|
||||
#include <xpc/private/plist.h>
|
||||
#include <xpc/private/bundle.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_mach_send);
|
||||
#define XPC_TYPE_MACH_SEND (&_xpc_type_mach_send)
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_mach_recv);
|
||||
#define XPC_TYPE_MACH_RECV (&_xpc_type_mach_recv)
|
||||
__BEGIN_DECLS
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_serializer);
|
||||
#define XPC_TYPE_SERIALIZER (&_xpc_type_serializer)
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_pipe);
|
||||
#define XPC_TYPE_PIPE (&_xpc_type_pipe)
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_bundle);
|
||||
#define XPC_TYPE_BUNDLE (&_xpc_type_bundle)
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_service);
|
||||
#define XPC_TYPE_SERVICE (&_xpc_type_service)
|
||||
@ -137,9 +137,7 @@ const char* xpc_type_get_name(xpc_type_t xtype);
|
||||
|
||||
xpc_connection_t xpc_connection_create_listener(const char* name, dispatch_queue_t queue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_BUNDLE_H_
|
||||
#define _XPC_PRIVATE_BUNDLE_H_
|
||||
|
||||
@ -5,6 +24,14 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_bundle);
|
||||
#define XPC_TYPE_BUNDLE (&_xpc_type_bundle)
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_DECL(xpc_bundle);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
OS_ENUM(xpc_bundle_error, int,
|
||||
xpc_bundle_error_success,
|
||||
xpc_bundle_error_failed_to_read_plist = -1,
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_DATE_H_
|
||||
#define _XPC_PRIVATE_DATE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_ENDPOINT_H_
|
||||
#define _XPC_PRIVATE_ENDPOINT_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_MACH_RECV_H_
|
||||
#define _XPC_PRIVATE_MACH_RECV_H_
|
||||
|
||||
@ -6,6 +25,14 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_mach_recv);
|
||||
#define XPC_TYPE_MACH_RECV (&_xpc_type_mach_recv)
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_DECL(xpc_mach_recv);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
xpc_object_t xpc_mach_recv_create(mach_port_t recv);
|
||||
mach_port_t xpc_mach_recv_extract_right(xpc_object_t xrecv);
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_MACH_SEND_H_
|
||||
#define _XPC_PRIVATE_MACH_SEND_H_
|
||||
|
||||
@ -6,6 +25,14 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_mach_send);
|
||||
#define XPC_TYPE_MACH_SEND (&_xpc_type_mach_send)
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_DECL(xpc_mach_send);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
xpc_object_t xpc_mach_send_create(mach_port_t send);
|
||||
xpc_object_t xpc_mach_send_create_with_disposition(mach_port_t send, unsigned int disposition);
|
||||
mach_port_t xpc_mach_send_copy_right(xpc_object_t xsend);
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_PIPE_H_
|
||||
#define _XPC_PRIVATE_PIPE_H_
|
||||
|
||||
@ -9,6 +28,10 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
XPC_EXPORT
|
||||
XPC_TYPE(_xpc_type_pipe);
|
||||
#define XPC_TYPE_PIPE (&_xpc_type_pipe)
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_DECL(xpc_pipe);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_PRIVATE_PLIST_H_
|
||||
#define _XPC_PRIVATE_PLIST_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_GENERIC_ARRAY_H_
|
||||
#define _XPC_GENERIC_ARRAY_H_
|
||||
|
||||
|
@ -1,32 +1,24 @@
|
||||
/*
|
||||
* Copyright 2014-2015 iXsystems, Inc.
|
||||
* All rights reserved
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted providing that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* 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 _LIBXPC_XPC_INTERNAL_H
|
||||
#define _LIBXPC_XPC_INTERNAL_H
|
||||
#ifndef _XPC_INTERNAL_H
|
||||
#define _XPC_INTERNAL_H
|
||||
|
||||
#include <xpc/private.h>
|
||||
|
||||
@ -62,4 +54,4 @@
|
||||
#import <xpc/objects/uint64.h>
|
||||
#import <xpc/objects/uuid.h>
|
||||
|
||||
#endif /* _LIBXPC_XPC_INTERNAL_H */
|
||||
#endif /* _XPC_INTERNAL_H */
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_INTERNAL_BASE_H_
|
||||
#define _XPC_INTERNAL_BASE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_ACTIVITY_H_
|
||||
#define _XPC_OBJECTS_ACTIVITY_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_ARRAY_H_
|
||||
#define _XPC_OBJECTS_ARRAY_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_BASE_H_
|
||||
#define _XPC_OBJECTS_BASE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_BOOL_H_
|
||||
#define _XPC_OBJECTS_BOOL_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_BUNDLE_H_
|
||||
#define _XPC_OBJECTS_BUNDLE_H_
|
||||
|
||||
@ -5,7 +24,9 @@
|
||||
|
||||
#include <dispatch/dispatch.h>
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_CLASS_DECL(bundle);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
@class XPC_CLASS(string);
|
||||
@class XPC_CLASS(dictionary);
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_CONNECTION_H_
|
||||
#define _XPC_OBJECTS_CONNECTION_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_DATA_H_
|
||||
#define _XPC_OBJECTS_DATA_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_DATE_H_
|
||||
#define _XPC_OBJECTS_DATE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_DESERIALIZER_H_
|
||||
#define _XPC_OBJECTS_DESERIALIZER_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_DICTIONARY_H_
|
||||
#define _XPC_OBJECTS_DICTIONARY_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_DOUBLE_H_
|
||||
#define _XPC_OBJECTS_DOUBLE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_ENDPOINT_H_
|
||||
#define _XPC_OBJECTS_ENDPOINT_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_ERROR_H_
|
||||
#define _XPC_OBJECTS_ERROR_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_FD_H_
|
||||
#define _XPC_OBJECTS_FD_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_FILE_TRANSFER_H_
|
||||
#define _XPC_OBJECTS_FILE_TRANSFER_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_INT64_H_
|
||||
#define _XPC_OBJECTS_INT64_H_
|
||||
|
||||
|
@ -1,10 +1,31 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_MACH_RECV_H_
|
||||
#define _XPC_OBJECTS_MACH_RECV_H_
|
||||
|
||||
#import <xpc/objects/base.h>
|
||||
#import <mach/port.h>
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_CLASS_DECL(mach_recv);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
struct xpc_mach_recv_s {
|
||||
struct xpc_object_s base;
|
||||
|
@ -1,10 +1,31 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_MACH_SEND_H_
|
||||
#define _XPC_OBJECTS_MACH_SEND_H_
|
||||
|
||||
#import <xpc/objects/base.h>
|
||||
#import <mach/mach_port.h>
|
||||
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_PUSH;
|
||||
XPC_CLASS_DECL(mach_send);
|
||||
XPC_IGNORE_DUPLICATE_PROTOCOL_POP;
|
||||
|
||||
struct xpc_mach_send_s {
|
||||
struct xpc_object_s base;
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_NULL_H_
|
||||
#define _XPC_OBJECTS_NULL_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_PIPE_H_
|
||||
#define _XPC_OBJECTS_PIPE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_PLIST_BINARY_V0_DESERIALIZER_H_
|
||||
#define _XPC_OBJECTS_PLIST_BINARY_V0_DESERIALIZER_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_PLIST_XML_ELEMENT_H_
|
||||
#define _XPC_OBJECTS_PLIST_XML_ELEMENT_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_POINTER_H_
|
||||
#define _XPC_OBJECTS_POINTER_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_SERIALIZER_H_
|
||||
#define _XPC_OBJECTS_SERIALIZER_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_SERVICE_H_
|
||||
#define _XPC_OBJECTS_SERVICE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_SERVICE_INSTANCE_H_
|
||||
#define _XPC_OBJECTS_SERVICE_INSTANCE_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_SHMEM_H_
|
||||
#define _XPC_OBJECTS_SHMEM_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_STRING_H_
|
||||
#define _XPC_OBJECTS_STRING_H_
|
||||
|
||||
@ -15,26 +34,26 @@ struct xpc_string_s {
|
||||
|
||||
@interface XPC_CLASS_INTERFACE(string)
|
||||
|
||||
// this API is modeled after NSString
|
||||
// this API is modeled after NSString (except with CString instead of UTF8String)
|
||||
|
||||
// non-NSString property; length of the string in bytes, not including the null terminator
|
||||
@property(readonly) NSUInteger byteLength;
|
||||
@property(readonly) const char* UTF8String;
|
||||
@property(readonly) const char* CString;
|
||||
|
||||
+ (instancetype)stringWithUTF8String: (const char*)string;
|
||||
+ (instancetype)stringWithCString: (const char*)string;
|
||||
// non-NSString method
|
||||
+ (instancetype)stringWithUTF8String: (const char*)string byteLength: (NSUInteger)byteLength;
|
||||
+ (instancetype)stringWithCString: (const char*)string byteLength: (NSUInteger)byteLength;
|
||||
// non-NSString method
|
||||
+ (instancetype)stringWithUTF8StringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt;
|
||||
+ (instancetype)stringWithCStringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt;
|
||||
+ (instancetype) XPC_PRINTF(1, 2) stringWithFormat: (const char*)format, ...;
|
||||
|
||||
// non-NSString method
|
||||
- (instancetype)initWithUTF8String: (const char*)string byteLength: (NSUInteger)byteLength;
|
||||
- (instancetype)initWithUTF8String: (const char*)string;
|
||||
- (instancetype)initWithCString: (const char*)string byteLength: (NSUInteger)byteLength;
|
||||
- (instancetype)initWithCString: (const char*)string;
|
||||
// non-NSString method
|
||||
- (instancetype)initWithUTF8StringNoCopy: (const char*)string byteLength: (NSUInteger)byteLength freeWhenDone: (BOOL)freeIt;
|
||||
- (instancetype)initWithCStringNoCopy: (const char*)string byteLength: (NSUInteger)byteLength freeWhenDone: (BOOL)freeIt;
|
||||
// non-NSString method
|
||||
- (instancetype)initWithUTF8StringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt;
|
||||
- (instancetype)initWithCStringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt;
|
||||
- (instancetype) XPC_PRINTF(1, 2) initWithFormat: (const char*)format, ...;
|
||||
- (instancetype) XPC_PRINTF(1, 0) initWithFormat: (const char*)format arguments: (va_list)args;
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_UINT64_H_
|
||||
#define _XPC_OBJECTS_UINT64_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_OBJECTS_UUID_H_
|
||||
#define _XPC_OBJECTS_UUID_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_INTERNAL_PLIST_H_
|
||||
#define _XPC_INTERNAL_PLIST_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <os/object.h>
|
||||
|
||||
#if __OBJC2__
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_UTIL_H_
|
||||
#define _XPC_UTIL_H_
|
||||
|
||||
@ -24,7 +43,7 @@
|
||||
* @code
|
||||
* xpc_object_t some_input = get_some_input();
|
||||
* TO_OBJC_CHECKED(string, some_input, some_checked_input) {
|
||||
* printf("Yay! It's a string! Look: %s\n", some_checked_input.description.UTF8String); // note that this assumes NSString is loaded
|
||||
* printf("Yay! It's a string! Look: %s\n", some_checked_input.description.CString); // note that this assumes NSString is loaded
|
||||
* } else {
|
||||
* printf("Oh no, you messed up and gave me an object that wasn't a string :(\n");
|
||||
* }
|
||||
@ -32,7 +51,7 @@
|
||||
*/
|
||||
#define TO_OBJC_CHECKED(className, origName, objcName) \
|
||||
XPC_CLASS(className)* objcName = XPC_CAST(className, origName); \
|
||||
if (objcName && [objcName isKindOfClass: [XPC_CLASS(className) class]])
|
||||
if ([objcName isKindOfClass: [XPC_CLASS(className) class]])
|
||||
|
||||
/**
|
||||
* Like `TO_OBJC_CHECKED`, but the condition checks for failure to pass the checks.
|
||||
@ -41,7 +60,7 @@
|
||||
*/
|
||||
#define TO_OBJC_CHECKED_ON_FAIL(className, origName, objcName) \
|
||||
XPC_CLASS(className)* objcName = XPC_CAST(className, origName); \
|
||||
if (!objcName || ![objcName isKindOfClass: [XPC_CLASS(className) class]])
|
||||
if (![objcName isKindOfClass: [XPC_CLASS(className) class]])
|
||||
|
||||
/**
|
||||
* Special `retain` variant for collection classes like dictionaries and arrays.
|
||||
|
@ -1,5 +1,24 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#
|
||||
# This file is part of Darling.
|
||||
#
|
||||
# Copyright (C) 2021 Darling developers
|
||||
#
|
||||
# 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 sys
|
||||
|
||||
def to_padded_hex(value, hex_digits=2):
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/activity.h>
|
||||
#import <xpc/objects/string.h>
|
||||
#import <xpc/util.h>
|
||||
|
19
src/array.m
19
src/array.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/array.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/private.h>
|
||||
|
26
src/base.m
26
src/base.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/base.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
#import <Foundation/NSString.h>
|
||||
@ -41,9 +60,10 @@ _Pragma("GCC diagnostic pop");
|
||||
Class nsstring = objc_lookUpClass("NSString");
|
||||
if (!nsstring) return nil;
|
||||
char* desc = self.xpcDescription;
|
||||
NSString* string = [nsstring stringWithUTF8String: desc];
|
||||
free(desc);
|
||||
return string;
|
||||
return [[[nsstring alloc] initWithBytesNoCopy: desc
|
||||
length: strlen(desc)
|
||||
encoding: NSUTF8StringEncoding
|
||||
freeWhenDone: YES] autorelease];
|
||||
}
|
||||
|
||||
- (BOOL)isEqual: (id)object
|
||||
|
19
src/bool.m
19
src/bool.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/bool.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
51
src/bundle.m
51
src/bundle.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/bundle.h>
|
||||
#import <xpc/objects/string.h>
|
||||
#import <xpc/objects/dictionary.h>
|
||||
@ -26,7 +45,7 @@ XPC_CLASS_HEADER(bundle);
|
||||
if (!exec_path) {
|
||||
return NULL;
|
||||
}
|
||||
return [[[[self class] alloc] initWithPath: [XPC_CLASS(string) stringWithUTF8StringNoCopy: exec_path freeWhenDone: YES]] autorelease];
|
||||
return [[[[self class] alloc] initWithPath: [XPC_CLASS(string) stringWithCStringNoCopy: exec_path freeWhenDone: YES]] autorelease];
|
||||
}
|
||||
|
||||
+ (BOOL)pathIsBundleRoot: (XPC_CLASS(string)*)path
|
||||
@ -36,11 +55,11 @@ XPC_CLASS_HEADER(bundle);
|
||||
// in either case, however, we can tell if it's the bundle root if it contains an Info.plist (it's required for all bundles).
|
||||
// the difference is just in whether it's directly in the root or in a `Contents` directory.
|
||||
if (strcmp(path.pathExtension, "framework") == 0) {
|
||||
if (xpc_path_is_file([path stringByAppendingPathComponent: "Info.plist"].UTF8String)) {
|
||||
if (xpc_path_is_file([path stringByAppendingPathComponent: "Info.plist"].CString)) {
|
||||
return YES;
|
||||
}
|
||||
} else {
|
||||
if (xpc_path_is_file([path stringByAppendingPathComponent: "Contents/Info.plist"].UTF8String)) {
|
||||
if (xpc_path_is_file([path stringByAppendingPathComponent: "Contents/Info.plist"].CString)) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
@ -158,7 +177,7 @@ XPC_CLASS_HEADER(bundle);
|
||||
|
||||
- (XPC_CLASS(string)*)pathForResource: (const char*)name ofType: (const char*)type
|
||||
{
|
||||
return [XPC_CLASS(string) stringWithFormat: "%s/%s.%s", self.bundlePath.UTF8String, name, type];
|
||||
return [XPC_CLASS(string) stringWithFormat: "%s/%s.%s", self.bundlePath.CString, name, type];
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)pathForSubdirectoryOfType: (xpc_bundle_subdirectory_type_t)type
|
||||
@ -184,7 +203,7 @@ XPC_CLASS_HEADER(bundle);
|
||||
result = [[[self.infoDictionary stringForKey: "NSExecutable"] retain] autorelease];
|
||||
if (!result) {
|
||||
// finally, if all else fails, try to use the same name as the bundle
|
||||
result = [[XPC_CLASS(string) stringWithUTF8String: self.bundlePath.lastPathComponent] stringByDeletingPathExtension];
|
||||
result = [[XPC_CLASS(string) stringWithCString: self.bundlePath.lastPathComponent] stringByDeletingPathExtension];
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,11 +234,11 @@ XPC_CLASS_HEADER(bundle);
|
||||
|
||||
// cache the executable path
|
||||
executableDirTmp = (self.isFramework) ? self.bundlePath : [self.bundlePath stringByAppendingPathComponent: "Contents/MacOS"];
|
||||
self.executablePath = [[executableDirTmp stringByAppendingPathComponent: [self resolveExecutableName].UTF8String] stringByResolvingSymlinksInPath];
|
||||
self.executablePath = [[executableDirTmp stringByAppendingPathComponent: [self resolveExecutableName].CString] stringByResolvingSymlinksInPath];
|
||||
|
||||
// resolve XPC services
|
||||
this->services = [XPC_CLASS(array) new];
|
||||
xpcServicesDir = opendir(xpcServicesPath.UTF8String);
|
||||
xpcServicesDir = opendir(xpcServicesPath.CString);
|
||||
if (xpcServicesDir) {
|
||||
while ((xpcServiceDirent = readdir(xpcServicesDir))) {
|
||||
@autoreleasepool {
|
||||
@ -246,11 +265,11 @@ XPC_CLASS_HEADER(bundle);
|
||||
void* buffer = NULL;
|
||||
xpc_object_t plist = NULL;
|
||||
|
||||
if (!xpc_path_is_file(self.infoPath.UTF8String)) {
|
||||
if (!xpc_path_is_file(self.infoPath.CString)) {
|
||||
// no Info.plist; let's continue the resolution with an empty plist
|
||||
plist = [XPC_CLASS(dictionary) new];
|
||||
} else {
|
||||
fd = open(self.infoPath.UTF8String, O_RDONLY);
|
||||
fd = open(self.infoPath.CString, O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
self.error = xpc_bundle_error_failed_to_read_plist;
|
||||
@ -291,7 +310,7 @@ XPC_CLASS_HEADER(bundle);
|
||||
{
|
||||
int fd = -1;
|
||||
|
||||
if (!xpc_path_is_file(self.infoPath.UTF8String)) {
|
||||
if (!xpc_path_is_file(self.infoPath.CString)) {
|
||||
// no Info.plist; let's continue the resolution with an empty plist
|
||||
callback = Block_copy(callback);
|
||||
dispatch_async(resolutionQueue, ^{
|
||||
@ -304,7 +323,7 @@ XPC_CLASS_HEADER(bundle);
|
||||
return;
|
||||
}
|
||||
|
||||
fd = open(self.infoPath.UTF8String, O_RDONLY);
|
||||
fd = open(self.infoPath.CString, O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
self.error = xpc_bundle_error_failed_to_read_plist;
|
||||
@ -340,7 +359,7 @@ char* xpc_bundle_copy_resource_path(xpc_object_t xbundle, const char* name, cons
|
||||
TO_OBJC_CHECKED(bundle, xbundle, bundle) {
|
||||
@autoreleasepool {
|
||||
XPC_CLASS(string)* path = [bundle pathForResource: name ofType: type];
|
||||
return path ? strdup(path.UTF8String) : NULL;
|
||||
return path ? strdup(path.CString) : NULL;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
@ -356,14 +375,14 @@ xpc_object_t xpc_bundle_copy_services(xpc_object_t xbundle) {
|
||||
XPC_EXPORT
|
||||
xpc_object_t xpc_bundle_create(const char* path, unsigned int flags) {
|
||||
@autoreleasepool {
|
||||
return [[XPC_CLASS(bundle) alloc] initWithPath: [XPC_CLASS(string) stringWithUTF8String: path]];
|
||||
return [[XPC_CLASS(bundle) alloc] initWithPath: [XPC_CLASS(string) stringWithCString: path]];
|
||||
}
|
||||
};
|
||||
|
||||
XPC_EXPORT
|
||||
xpc_object_t xpc_bundle_create_from_origin(unsigned int origin, const char* path) {
|
||||
@autoreleasepool {
|
||||
return [[XPC_CLASS(bundle) alloc] initWithPath: [XPC_CLASS(string) stringWithUTF8String: path]];
|
||||
return [[XPC_CLASS(bundle) alloc] initWithPath: [XPC_CLASS(string) stringWithCString: path]];
|
||||
}
|
||||
};
|
||||
|
||||
@ -385,7 +404,7 @@ int xpc_bundle_get_error(xpc_object_t xbundle) {
|
||||
XPC_EXPORT
|
||||
const char* xpc_bundle_get_executable_path(xpc_object_t xbundle) {
|
||||
TO_OBJC_CHECKED(bundle, xbundle, bundle) {
|
||||
return bundle.executablePath.UTF8String;
|
||||
return bundle.executablePath.CString;
|
||||
}
|
||||
return NULL;
|
||||
};
|
||||
@ -401,7 +420,7 @@ xpc_object_t xpc_bundle_get_info_dictionary(xpc_object_t xbundle) {
|
||||
XPC_EXPORT
|
||||
const char* xpc_bundle_get_path(xpc_object_t xbundle) {
|
||||
TO_OBJC_CHECKED(bundle, xbundle, bundle) {
|
||||
return bundle.bundlePath.UTF8String;
|
||||
return bundle.bundlePath.CString;
|
||||
}
|
||||
return NULL;
|
||||
};
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/connection.h>
|
||||
#import <xpc/objects/dictionary.h>
|
||||
#import <xpc/objects/endpoint.h>
|
||||
|
19
src/data.m
19
src/data.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/data.h>
|
||||
#import <xpc/util.h>
|
||||
#define __DISPATCH_INDIRECT__
|
||||
|
19
src/date.m
19
src/date.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/date.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/dictionary.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/private.h>
|
||||
|
19
src/double.m
19
src/double.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/double.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/endpoint.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
21
src/error.m
21
src/error.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/error.h>
|
||||
#import <xpc/objects/string.h>
|
||||
#import <xpc/xpc.h>
|
||||
@ -57,7 +76,7 @@ XPC_CLASS_HEADER(error);
|
||||
- (char*)xpcDescription
|
||||
{
|
||||
char* output = NULL;
|
||||
asprintf(&output, "<%s: %s>", xpc_class_name(self), [self stringForKey: XPCErrorDescriptionKey].UTF8String);
|
||||
asprintf(&output, "<%s: %s>", xpc_class_name(self), [self stringForKey: XPCErrorDescriptionKey].CString);
|
||||
return output;
|
||||
}
|
||||
|
||||
|
19
src/event.m
19
src/event.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
||||
|
19
src/fd.m
19
src/fd.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/fd.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/file_transfer.h>
|
||||
#import <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
19
src/init.c
19
src/init.c
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
|
||||
void xpc_stub_init(void);
|
||||
|
19
src/int64.m
19
src/int64.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/int64.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <launch.h>
|
||||
#import <xpc/util.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/mach_recv.h>
|
||||
#import <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/mach_send.h>
|
||||
#import <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
19
src/misc.m
19
src/misc.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
#import <mach-o/dyld_priv.h>
|
||||
|
19
src/null.m
19
src/null.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/null.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
19
src/pipe.m
19
src/pipe.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/pipe.h>
|
||||
#import <xpc/objects/dictionary.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
35
src/plist.m
35
src/plist.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/plist.h>
|
||||
#import <xpc/objects/string.h>
|
||||
#import <xpc/objects/dictionary.h>
|
||||
@ -276,7 +295,7 @@ XPC_CLASS_HEADER(plist_xml_element);
|
||||
dispatch_data_t dispatchData = NULL;
|
||||
XPC_CLASS(data)* xpcData = nil;
|
||||
|
||||
temp = dispatch_data_create(string.UTF8String, string.byteLength, NULL, DISPATCH_DATA_DESTRUCTOR_NONE);
|
||||
temp = dispatch_data_create(string.CString, string.byteLength, NULL, DISPATCH_DATA_DESTRUCTOR_NONE);
|
||||
if (!temp) {
|
||||
goto data_error;
|
||||
}
|
||||
@ -316,7 +335,7 @@ XPC_CLASS_HEADER(plist_xml_element);
|
||||
|
||||
// not using strptime because that aborts the whole thing if parts are missing;
|
||||
// we need to be able to optionally omit components (which sscanf supports)
|
||||
sscanf(string.UTF8String ? string.UTF8String : "", "%d-%d-%dT%d:%d:%dZ", &time.tm_year, &time.tm_mon, &time.tm_mday, &time.tm_hour, &time.tm_min, &time.tm_sec);
|
||||
sscanf(string.CString ? string.CString : "", "%d-%d-%dT%d:%d:%dZ", &time.tm_year, &time.tm_mon, &time.tm_mday, &time.tm_hour, &time.tm_min, &time.tm_sec);
|
||||
if (time.tm_year > 0) {
|
||||
time.tm_year -= 1900;
|
||||
}
|
||||
@ -330,14 +349,14 @@ XPC_CLASS_HEADER(plist_xml_element);
|
||||
|
||||
case xpc_plist_xml_element_type_real: {
|
||||
XPC_CLASS(string)* string = XPC_CAST(string, this->object);
|
||||
double value = atof(string.UTF8String);
|
||||
double value = atof(string.CString);
|
||||
[this->object release];
|
||||
this->object = [[XPC_CLASS(double) alloc] initWithValue: value];
|
||||
} break;
|
||||
|
||||
case xpc_plist_xml_element_type_integer: {
|
||||
XPC_CLASS(string)* string = XPC_CAST(string, this->object);
|
||||
int64_t value = atoll(string.UTF8String);
|
||||
int64_t value = atoll(string.CString);
|
||||
[this->object release];
|
||||
this->object = [[XPC_CLASS(int64) alloc] initWithValue: value];
|
||||
} break;
|
||||
@ -387,7 +406,7 @@ handover_to_parent:
|
||||
self.cache = XPC_CAST(string, child.object);
|
||||
} else {
|
||||
xpc_assert(self.cache);
|
||||
[XPC_CAST(dictionary, this->object) setObject: child.object forKey: self.cache.UTF8String];
|
||||
[XPC_CAST(dictionary, this->object) setObject: child.object forKey: self.cache.CString];
|
||||
self.cache = nil;
|
||||
}
|
||||
} break;
|
||||
@ -847,7 +866,7 @@ XPC_CLASS_HEADER(plist_binary_v0_deserializer);
|
||||
if (length == NSUIntegerMax) {
|
||||
return nil;
|
||||
}
|
||||
return [[XPC_CLASS(string) alloc] initWithUTF8String: (const char*)bytes byteLength: length];
|
||||
return [[XPC_CLASS(string) alloc] initWithCString: (const char*)bytes byteLength: length];
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)readUTF16String: (const uint8_t*)object
|
||||
@ -865,7 +884,7 @@ XPC_CLASS_HEADER(plist_binary_v0_deserializer);
|
||||
data = dispatch_data_create(bytes, length, NULL, DISPATCH_DATA_DESTRUCTOR_NONE);
|
||||
// how nice of them to have something specifically for this purpose :)
|
||||
transformed = dispatch_data_create_with_transform(data, DISPATCH_DATA_FORMAT_TYPE_UTF16BE, DISPATCH_DATA_FORMAT_TYPE_UTF8);
|
||||
result = [[XPC_CLASS(string) alloc] initWithUTF8String: dispatch_data_get_flattened_bytes_4libxpc(transformed) byteLength: dispatch_data_get_size(transformed)];
|
||||
result = [[XPC_CLASS(string) alloc] initWithCString: dispatch_data_get_flattened_bytes_4libxpc(transformed) byteLength: dispatch_data_get_size(transformed)];
|
||||
[transformed release];
|
||||
[data release];
|
||||
|
||||
@ -950,7 +969,7 @@ XPC_CLASS_HEADER(plist_binary_v0_deserializer);
|
||||
XPC_CLASS(object)* key = [self readObject: keyReferenceNumber];
|
||||
XPC_CLASS(object)* value = [self readObject: valueReferenceNumber];
|
||||
TO_OBJC_CHECKED(string, key, keyString) {
|
||||
[result setObject: value forKey: keyString.UTF8String];
|
||||
[result setObject: value forKey: keyString.CString];
|
||||
}
|
||||
[key release];
|
||||
[value release];
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/pointer.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <reboot2.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
|
||||
@ -90,7 +109,7 @@ void xpc_main(xpc_connection_handler_t handler) {
|
||||
xpc_abort("failed to determine main bundle identifier");
|
||||
}
|
||||
|
||||
server = [[XPC_CLASS(connection) alloc] initAsServerForService: identifier.UTF8String queue: NULL];
|
||||
server = [[XPC_CLASS(connection) alloc] initAsServerForService: identifier.CString queue: NULL];
|
||||
if (!server) {
|
||||
xpc_abort("failed to create server connection");
|
||||
}
|
||||
@ -115,7 +134,7 @@ void xpc_main(xpc_connection_handler_t handler) {
|
||||
[server activate];
|
||||
});
|
||||
|
||||
runloopType = runloop_name_to_type([XPC_CAST(dictionary, xpc_bundle_get_xpcservice_dictionary(mainBundle)) stringForKey: XPC_SERVICE_DICT_RUNLOOP_TYPE_KEY].UTF8String);
|
||||
runloopType = runloop_name_to_type([XPC_CAST(dictionary, xpc_bundle_get_xpcservice_dictionary(mainBundle)) stringForKey: XPC_SERVICE_DICT_RUNLOOP_TYPE_KEY].CString);
|
||||
|
||||
switch (runloopType) {
|
||||
case xpc_service_runloop_type_dispatch: {
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/service.h>
|
||||
#import <xpc/objects/service_instance.h>
|
||||
#import <xpc/util.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/service_instance.h>
|
||||
#import <xpc/xpc.h>
|
||||
#import <xpc/endpoint.h>
|
||||
|
19
src/shmem.m
19
src/shmem.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/shmem.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
97
src/string.m
97
src/string.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/string.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
@ -10,19 +29,19 @@ OS_OBJECT_NONLAZY_CLASS
|
||||
|
||||
XPC_CLASS_HEADER(string);
|
||||
|
||||
+ (instancetype)stringWithUTF8String: (const char*)string
|
||||
+ (instancetype)stringWithCString: (const char*)string
|
||||
{
|
||||
return [[[[self class] alloc] initWithUTF8String: string] autorelease];
|
||||
return [[[[self class] alloc] initWithCString: string] autorelease];
|
||||
}
|
||||
|
||||
+ (instancetype)stringWithUTF8String: (const char*)string byteLength: (NSUInteger)byteLength
|
||||
+ (instancetype)stringWithCString: (const char*)string byteLength: (NSUInteger)byteLength
|
||||
{
|
||||
return [[[[self class] alloc] initWithUTF8String: string byteLength: byteLength] autorelease];
|
||||
return [[[[self class] alloc] initWithCString: string byteLength: byteLength] autorelease];
|
||||
}
|
||||
|
||||
+ (instancetype)stringWithUTF8StringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt
|
||||
+ (instancetype)stringWithCStringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt
|
||||
{
|
||||
return [[[[self class] alloc] initWithUTF8StringNoCopy: string freeWhenDone: freeIt] autorelease];
|
||||
return [[[[self class] alloc] initWithCStringNoCopy: string freeWhenDone: freeIt] autorelease];
|
||||
}
|
||||
|
||||
+ (instancetype)stringWithFormat: (const char*)format, ...
|
||||
@ -46,8 +65,8 @@ XPC_CLASS_HEADER(string);
|
||||
- (char*)xpcDescription
|
||||
{
|
||||
char* output = NULL;
|
||||
if (self.UTF8String) {
|
||||
asprintf(&output, "<%s: %s>", xpc_class_name(self), self.UTF8String);
|
||||
if (self.CString) {
|
||||
asprintf(&output, "<%s: %s>", xpc_class_name(self), self.CString);
|
||||
} else {
|
||||
asprintf(&output, "<%s: NULL>", xpc_class_name(self));
|
||||
}
|
||||
@ -63,7 +82,7 @@ XPC_CLASS_HEADER(string);
|
||||
return this->byteLength;
|
||||
}
|
||||
|
||||
- (const char*)UTF8String
|
||||
- (const char*)CString
|
||||
{
|
||||
XPC_THIS_DECL(string);
|
||||
return this->string;
|
||||
@ -71,10 +90,10 @@ XPC_CLASS_HEADER(string);
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithUTF8String: "" byteLength: 0];
|
||||
return [self initWithCString: "" byteLength: 0];
|
||||
}
|
||||
|
||||
- (instancetype)initWithUTF8String: (const char*)string byteLength: (NSUInteger)byteLength
|
||||
- (instancetype)initWithCString: (const char*)string byteLength: (NSUInteger)byteLength
|
||||
{
|
||||
if (self = [super init]) {
|
||||
XPC_THIS_DECL(string);
|
||||
@ -93,12 +112,12 @@ XPC_CLASS_HEADER(string);
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithUTF8String: (const char*)string
|
||||
- (instancetype)initWithCString: (const char*)string
|
||||
{
|
||||
return [self initWithUTF8String: string byteLength: strlen(string)];
|
||||
return [self initWithCString: string byteLength: strlen(string)];
|
||||
}
|
||||
|
||||
- (instancetype)initWithUTF8StringNoCopy: (const char*)string byteLength: (NSUInteger)byteLength freeWhenDone: (BOOL)freeIt
|
||||
- (instancetype)initWithCStringNoCopy: (const char*)string byteLength: (NSUInteger)byteLength freeWhenDone: (BOOL)freeIt
|
||||
{
|
||||
if (self = [super init]) {
|
||||
XPC_THIS_DECL(string);
|
||||
@ -110,9 +129,9 @@ XPC_CLASS_HEADER(string);
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithUTF8StringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt
|
||||
- (instancetype)initWithCStringNoCopy: (const char*)string freeWhenDone: (BOOL)freeIt
|
||||
{
|
||||
return [self initWithUTF8StringNoCopy: string byteLength: strlen(string) freeWhenDone: freeIt];
|
||||
return [self initWithCStringNoCopy: string byteLength: strlen(string) freeWhenDone: freeIt];
|
||||
}
|
||||
|
||||
- (instancetype)initWithFormat: (const char*)format, ...
|
||||
@ -166,7 +185,7 @@ XPC_CLASS_HEADER(string);
|
||||
|
||||
- (instancetype)forceCopy
|
||||
{
|
||||
return [[[self class] alloc] initWithUTF8String: self.UTF8String];
|
||||
return [[[self class] alloc] initWithCString: self.CString];
|
||||
}
|
||||
|
||||
- (void)appendString: (const char*)string length: (NSUInteger)extraByteLength
|
||||
@ -199,12 +218,12 @@ XPC_CLASS_HEADER(string);
|
||||
|
||||
- (XPC_CLASS(string)*)stringByAppendingString: (const char*)string
|
||||
{
|
||||
return [[self class] stringWithFormat: "%s/%s", self.UTF8String, string];
|
||||
return [[self class] stringWithFormat: "%s/%s", self.CString, string];
|
||||
}
|
||||
|
||||
- (BOOL)isEqualToString: (const char*)string
|
||||
{
|
||||
return strcmp(self.UTF8String, string) == 0;
|
||||
return strcmp(self.CString, string) == 0;
|
||||
}
|
||||
|
||||
@end
|
||||
@ -245,7 +264,7 @@ XPC_CLASS_HEADER(string);
|
||||
|
||||
// maybe we should check if the string length matches the reported length
|
||||
|
||||
result = [[[self class] alloc] initWithUTF8String: string];
|
||||
result = [[[self class] alloc] initWithCString: string];
|
||||
|
||||
return result;
|
||||
|
||||
@ -266,7 +285,7 @@ error_out:
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if (![serializer writeString: self.UTF8String]) {
|
||||
if (![serializer writeString: self.CString]) {
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
@ -282,53 +301,53 @@ error_out:
|
||||
|
||||
- (const char*)pathExtension
|
||||
{
|
||||
char* lastDot = strrchr(self.UTF8String, '.');
|
||||
char* lastDot = strrchr(self.CString, '.');
|
||||
return lastDot ? lastDot + 1 : "";
|
||||
}
|
||||
|
||||
- (const char*)lastPathComponent
|
||||
{
|
||||
char* lastSlash = strrchr(self.UTF8String, '/');
|
||||
char* lastSlash = strrchr(self.CString, '/');
|
||||
return lastSlash ? lastSlash + 1 : "";
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)stringByDeletingPathExtension
|
||||
{
|
||||
char* lastDot = strrchr(self.UTF8String, '.');
|
||||
return (lastDot) ? [[self class] stringWithUTF8String: self.UTF8String byteLength: lastDot - self.UTF8String] : [self forceCopy];
|
||||
char* lastDot = strrchr(self.CString, '.');
|
||||
return (lastDot) ? [[self class] stringWithCString: self.CString byteLength: lastDot - self.CString] : [self forceCopy];
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)stringByResolvingSymlinksInPath
|
||||
{
|
||||
char* resolved = realpath(self.UTF8String, NULL);
|
||||
return resolved ? [[self class] stringWithUTF8StringNoCopy: resolved freeWhenDone: YES] : nil;
|
||||
char* resolved = realpath(self.CString, NULL);
|
||||
return resolved ? [[self class] stringWithCStringNoCopy: resolved freeWhenDone: YES] : nil;
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)stringByAppendingPathComponent: (const char*)component
|
||||
{
|
||||
if (self.byteLength == 0) {
|
||||
return [[self class] stringWithUTF8String: component];
|
||||
} else if (self.UTF8String[self.byteLength - 1] == '/') {
|
||||
return [[self class] stringWithCString: component];
|
||||
} else if (self.CString[self.byteLength - 1] == '/') {
|
||||
return [self stringByAppendingString: component];
|
||||
} else {
|
||||
return [[self class] stringWithFormat: "%s/%s", self.UTF8String, component];
|
||||
return [[self class] stringWithFormat: "%s/%s", self.CString, component];
|
||||
}
|
||||
}
|
||||
|
||||
- (XPC_CLASS(string)*)stringByDeletingLastPathComponent
|
||||
{
|
||||
char* lastSlash = strrchr(self.UTF8String, '/');
|
||||
if (lastSlash && lastSlash > self.UTF8String) {
|
||||
char* lastSlash = strrchr(self.CString, '/');
|
||||
if (lastSlash && lastSlash > self.CString) {
|
||||
*lastSlash = '\0'; // temporarily shorten the string for the copy...
|
||||
XPC_CLASS(string)* result = [[self class] stringWithUTF8String: self.UTF8String];
|
||||
XPC_CLASS(string)* result = [[self class] stringWithCString: self.CString];
|
||||
*lastSlash = '/'; // ...and then restore it
|
||||
return result;
|
||||
} else if (lastSlash == self.UTF8String) {
|
||||
} else if (lastSlash == self.CString) {
|
||||
// if it's the one for the root, return the root
|
||||
return [[self class] stringWithUTF8String: "/"];
|
||||
return [[self class] stringWithCString: "/"];
|
||||
} else {
|
||||
// otherwise, if it's not present, return an empty string
|
||||
return [[self class] stringWithUTF8String: ""];
|
||||
return [[self class] stringWithCString: ""];
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,7 +359,7 @@ error_out:
|
||||
|
||||
XPC_EXPORT
|
||||
xpc_object_t xpc_string_create(const char* string) {
|
||||
return [[XPC_CLASS(string) alloc] initWithUTF8String: string];
|
||||
return [[XPC_CLASS(string) alloc] initWithCString: string];
|
||||
};
|
||||
|
||||
XPC_EXPORT
|
||||
@ -368,7 +387,7 @@ size_t xpc_string_get_length(xpc_object_t xstring) {
|
||||
XPC_EXPORT
|
||||
const char* xpc_string_get_string_ptr(xpc_object_t xstring) {
|
||||
TO_OBJC_CHECKED(string, xstring, string) {
|
||||
return string.UTF8String;
|
||||
return string.CString;
|
||||
}
|
||||
return NULL;
|
||||
};
|
||||
@ -386,5 +405,5 @@ void _xpc_string_set_value(xpc_object_t xstring, const char* new_string) {
|
||||
|
||||
XPC_EXPORT
|
||||
xpc_object_t xpc_string_create_no_copy(const char* string) {
|
||||
return [[XPC_CLASS(string) alloc] initWithUTF8StringNoCopy: string freeWhenDone: NO];
|
||||
return [[XPC_CLASS(string) alloc] initWithCStringNoCopy: string freeWhenDone: NO];
|
||||
};
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <os/transaction_private.h>
|
||||
#include <os/object_private.h>
|
||||
#import <Foundation/NSZone.h>
|
||||
|
19
src/type.m
19
src/type.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#import <xpc/util.h>
|
||||
#import <objc/runtime.h>
|
||||
|
19
src/uint64.m
19
src/uint64.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/uint64.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
19
src/util.m
19
src/util.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/util.h>
|
||||
#import <objc/runtime.h>
|
||||
#import <xpc/serialization.h>
|
||||
|
19
src/uuid.m
19
src/uuid.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/objects/uuid.h>
|
||||
#import <xpc/util.h>
|
||||
#import <xpc/xpc.h>
|
||||
|
19
test/array.m
19
test/array.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
#include "test-util.h"
|
||||
|
19
test/base.m
19
test/base.m
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#import <xpc/xpc.h>
|
||||
|
||||
|
19
test/bool.c
19
test/bool.c
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#include <xpc/connection.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _CTEST_PLUS_H_
|
||||
#define _CTEST_PLUS_H_
|
||||
|
||||
|
19
test/data.c
19
test/data.c
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
#include "test-util.h"
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
#include "test-util.h"
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#include <xpc/connection.h>
|
||||
#include <xpc/endpoint.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_TEST_LAUNCHD_SERVICE_CLIENT_COMMON_H_
|
||||
#define _XPC_TEST_LAUNCHD_SERVICE_CLIENT_COMMON_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#include <xpc/endpoint.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 <xpc/xpc.h>
|
||||
#include <xpc/connection.h>
|
||||
#include <stdio.h>
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_TEST_LAUNCHD_SERVICE_SERVER_COMMON_H_
|
||||
#define _XPC_TEST_LAUNCHD_SERVICE_SERVER_COMMON_H_
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 _XPC_TEST_LAUNCHD_SERVICE_SERVICE_H_
|
||||
#define _XPC_TEST_LAUNCHD_SERVICE_SERVICE_H_
|
||||
|
||||
|
19
test/main.c
19
test/main.c
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define CTEST_MAIN
|
||||
|
||||
// uncomment lines below to enable/disable features. See README.md for details
|
||||
|
19
test/plist.c
19
test/plist.c
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/**
|
||||
* This file is part of Darling.
|
||||
*
|
||||
* Copyright (C) 2021 Darling developers
|
||||
*
|
||||
* 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 "ctest-plus.h"
|
||||
#include <xpc/private.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user