···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2020 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#ifndef _AppleSauce_H_
2121+#define _AppleSauce_H_
2222+2323+#include <vector>
2424+#include <string>
2525+#include <chrono>
2626+#include <iostream>
2727+#include <xpc/xpc.h>
2828+#include <dispatch/dispatch.h>
2929+3030+/**
3131+ * NOTE(@facekapow):
3232+ * these method signatures are pretty much guesses.
3333+ * good guesses, but guesses nonetheless
3434+ */
3535+3636+namespace applesauce {
3737+ namespace xpc {
3838+ class object {
3939+ public:
4040+ std::string to_string() const;
4141+ };
4242+ class dict {};
4343+ class connection {};
4444+4545+ char const* dyn_cast_or_default(object const&, char const*);
4646+ std::string dyn_cast_or_default(object const&, std::string const&);
4747+ std::vector<uint8_t> dyn_cast_or_default(object const&, std::vector<uint8_t> const&);
4848+ bool dyn_cast_or_default(object const&, bool);
4949+ double dyn_cast_or_default(object const&, double);
5050+ int dyn_cast_or_default(object const&, int);
5151+ unsigned int dyn_cast_or_default(object const&, unsigned int);
5252+ long dyn_cast_or_default(object const&, long);
5353+ unsigned long dyn_cast_or_default(object const&, unsigned long);
5454+ long long dyn_cast_or_default(object const&, long long);
5555+ unsigned long long dyn_cast_or_default(object const&, unsigned long long);
5656+5757+ namespace auto_reply {
5858+ dict const& create_from_dict(dict const&, connection const&);
5959+ dict const& create_from_reply(dict const&);
6060+ dict const& create_from_request(dict const&);
6161+ };
6262+ };
6363+ namespace dispatch {
6464+ namespace v1 {
6565+ class queue {};
6666+6767+ dispatch_time_t walltime(std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::micro>>);
6868+ };
6969+ };
7070+};
7171+7272+namespace docopt {
7373+ class value {};
7474+7575+ std::string const& docopt_parse(std::string const&, std::vector<std::string> const&, bool, bool, bool);
7676+ std::string const& docopt(std::string const&, std::vector<std::string> const&, bool, std::string const&, bool);
7777+ std::ostream& operator<<(std::ostream&, value const&);
7878+};
7979+8080+#endif