this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add AppleSauce framework stub

+246
+22
src/private-frameworks/AppleSauce/CMakeLists.txt
··· 1 + project(AppleSauce) 2 + 3 + set(DYLIB_COMPAT_VERSION "0.0.0") 4 + set(DYLIB_CURRENT_VERSION "0.0.0") 5 + 6 + include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/external/libcxx/include) 7 + 8 + add_compile_options(-Wno-error=stdlibcxx-not-found) 9 + 10 + add_framework(AppleSauce 11 + FAT 12 + CURRENT_VERSION 13 + PRIVATE 14 + VERSION "A" 15 + 16 + SOURCES 17 + src/AppleSauce.cpp 18 + 19 + DEPENDENCIES 20 + system 21 + cxx 22 + )
+80
src/private-frameworks/AppleSauce/include/AppleSauce/AppleSauce.h
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2020 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #ifndef _AppleSauce_H_ 21 + #define _AppleSauce_H_ 22 + 23 + #include <vector> 24 + #include <string> 25 + #include <chrono> 26 + #include <iostream> 27 + #include <xpc/xpc.h> 28 + #include <dispatch/dispatch.h> 29 + 30 + /** 31 + * NOTE(@facekapow): 32 + * these method signatures are pretty much guesses. 33 + * good guesses, but guesses nonetheless 34 + */ 35 + 36 + namespace applesauce { 37 + namespace xpc { 38 + class object { 39 + public: 40 + std::string to_string() const; 41 + }; 42 + class dict {}; 43 + class connection {}; 44 + 45 + char const* dyn_cast_or_default(object const&, char const*); 46 + std::string dyn_cast_or_default(object const&, std::string const&); 47 + std::vector<uint8_t> dyn_cast_or_default(object const&, std::vector<uint8_t> const&); 48 + bool dyn_cast_or_default(object const&, bool); 49 + double dyn_cast_or_default(object const&, double); 50 + int dyn_cast_or_default(object const&, int); 51 + unsigned int dyn_cast_or_default(object const&, unsigned int); 52 + long dyn_cast_or_default(object const&, long); 53 + unsigned long dyn_cast_or_default(object const&, unsigned long); 54 + long long dyn_cast_or_default(object const&, long long); 55 + unsigned long long dyn_cast_or_default(object const&, unsigned long long); 56 + 57 + namespace auto_reply { 58 + dict const& create_from_dict(dict const&, connection const&); 59 + dict const& create_from_reply(dict const&); 60 + dict const& create_from_request(dict const&); 61 + }; 62 + }; 63 + namespace dispatch { 64 + namespace v1 { 65 + class queue {}; 66 + 67 + dispatch_time_t walltime(std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::micro>>); 68 + }; 69 + }; 70 + }; 71 + 72 + namespace docopt { 73 + class value {}; 74 + 75 + std::string const& docopt_parse(std::string const&, std::vector<std::string> const&, bool, bool, bool); 76 + std::string const& docopt(std::string const&, std::vector<std::string> const&, bool, std::string const&, bool); 77 + std::ostream& operator<<(std::ostream&, value const&); 78 + }; 79 + 80 + #endif
+142
src/private-frameworks/AppleSauce/src/AppleSauce.cpp
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2020 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #include <AppleSauce/AppleSauce.h> 21 + #include <iostream> 22 + 23 + static bool verbose = false; 24 + 25 + __attribute__((constructor)) 26 + static void initme(void) { 27 + verbose = getenv("STUB_VERBOSE") != NULL; 28 + }; 29 + 30 + std::string applesauce::xpc::object::to_string() const { 31 + if (verbose) 32 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 33 + return std::string(); 34 + }; 35 + 36 + applesauce::xpc::dict const& applesauce::xpc::auto_reply::create_from_dict(dict const& dictionary, connection const&) { 37 + if (verbose) 38 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 39 + return dictionary; 40 + }; 41 + 42 + applesauce::xpc::dict const& applesauce::xpc::auto_reply::create_from_reply(dict const& reply) { 43 + if (verbose) 44 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 45 + return reply; 46 + }; 47 + 48 + applesauce::xpc::dict const& applesauce::xpc::auto_reply::create_from_request(dict const& request) { 49 + if (verbose) 50 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 51 + return request; 52 + }; 53 + 54 + char const* applesauce::xpc::dyn_cast_or_default(object const&, char const* def) { 55 + if (verbose) 56 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 57 + return def; 58 + }; 59 + 60 + std::string applesauce::xpc::dyn_cast_or_default(object const&, std::string const& def) { 61 + if (verbose) 62 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 63 + return def; 64 + }; 65 + 66 + std::vector<uint8_t> applesauce::xpc::dyn_cast_or_default(object const&, std::vector<uint8_t> const& def) { 67 + if (verbose) 68 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 69 + return def; 70 + }; 71 + 72 + bool applesauce::xpc::dyn_cast_or_default(object const&, bool def) { 73 + if (verbose) 74 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 75 + return def; 76 + }; 77 + 78 + double applesauce::xpc::dyn_cast_or_default(object const&, double def) { 79 + if (verbose) 80 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 81 + return def; 82 + }; 83 + 84 + int applesauce::xpc::dyn_cast_or_default(object const&, int def) { 85 + if (verbose) 86 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 87 + return def; 88 + }; 89 + 90 + unsigned int applesauce::xpc::dyn_cast_or_default(object const&, unsigned int def) { 91 + if (verbose) 92 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 93 + return def; 94 + }; 95 + 96 + long applesauce::xpc::dyn_cast_or_default(object const&, long def) { 97 + if (verbose) 98 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 99 + return def; 100 + }; 101 + 102 + unsigned long applesauce::xpc::dyn_cast_or_default(object const&, unsigned long def) { 103 + if (verbose) 104 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 105 + return def; 106 + }; 107 + 108 + long long applesauce::xpc::dyn_cast_or_default(object const&, long long def) { 109 + if (verbose) 110 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 111 + return def; 112 + }; 113 + 114 + unsigned long long applesauce::xpc::dyn_cast_or_default(object const&, unsigned long long def) { 115 + if (verbose) 116 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 117 + return def; 118 + }; 119 + 120 + dispatch_time_t applesauce::dispatch::v1::walltime(std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::micro>>) { 121 + if (verbose) 122 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 123 + return 0; 124 + }; 125 + 126 + std::string const& docopt::docopt_parse(std::string const& str, std::vector<std::string> const&, bool, bool, bool) { 127 + if (verbose) 128 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 129 + return str; 130 + }; 131 + 132 + std::string const& docopt::docopt(std::string const& str, std::vector<std::string> const&, bool, std::string const&, bool) { 133 + if (verbose) 134 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 135 + return str; 136 + }; 137 + 138 + std::ostream& docopt::operator<<(std::ostream& stream, docopt::value const&) { 139 + if (verbose) 140 + std::cerr << "STUB: " << __PRETTY_FUNCTION__ << " called" << std::endl; 141 + return stream; 142 + };
+1
src/private-frameworks/CMakeLists.txt
··· 3 3 add_compile_options(-Werror) 4 4 5 5 add_subdirectory(AppleSystemInfo) 6 + add_subdirectory(AppleSauce) 6 7 add_subdirectory(AuthKit) 7 8 add_subdirectory(CrashReporterSupport) 8 9 add_subdirectory(ConfigurationProfiles)
+1
src/private-frameworks/include/AppleSauce
··· 1 + ../AppleSauce/include/AppleSauce